INNER CODE UNIT · Python

project_status

GenielabsOpenSource/spine-animation-ai · reskin-app/app/backend/server.py:151

def project_status():
    if _State.project is None:
        return {"open": False}
    return {"open": True, **_State.project.to_payload()}


@app.post("/api/project/snapshot")
async def project_snapshot(request: Request, skin_name: str = Query(...)):
    """Save a frontend canvas snapshot as the AI input for a specific skin.

    Saved to `.genie/snapshots/{skin_name}.png`. The reskin pipeline reads
    this file as the source image for Gemini.
    """
    project = _State.require_project()
    body = await request.body()
    if not body:
        raise HTTPException(400, "empty body")
    snap_dir = project.workdir / "snapshots"

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…