{"openapi":"3.1.0","info":{"title":"SpriteCook API","description":"Generate and animate 2D game art (pixel art and detailed/HD) from code.\n\nAuthenticate with an API key in the `Authorization: Bearer sc_live_...` header.\nCreate keys on the API Keys page (https://app.spritecook.ai/api-keys); each key\ncarries a set of scopes (see the `apiKey` security scheme). New accounts get\nfree credits, no card needed.\n\nLong-running work is asynchronous: submit a job, then poll\n`GET /v1/api/jobs/{job_id}` with the returned `poll_url`. The `*-sync`\nvariants wait up to 90 seconds and return the finished job.\n\nErrors use one envelope: `{\"detail\": {\"error\": {\"code\": \"...\", \"message\": \"...\"}}}`.\n\nPrefer the MCP server (https://api.spritecook.ai/mcp) when you are an agent\nthat speaks MCP; it exposes the same capabilities as tools.\n","version":"1.0.0","summary":"AI pixel art and 2D game asset generation API.","termsOfService":"https://www.spritecook.ai/terms","contact":{"name":"SpriteCook support","email":"support@spritecook.ai","url":"https://www.spritecook.ai/contact"}},"servers":[{"url":"https://api.spritecook.ai","description":"Production"}],"paths":{"/v1/api/models":{"get":{"summary":"List models available to API-key generation clients and their credit costs","description":"List models available to API-key generation clients and their credit costs.","operationId":"getModels","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"ApiModelCatalog","type":"object","required":["models"],"properties":{"defaults":{"type":"object","additionalProperties":true,"description":"Default model per generation mode."},"models":{"type":"array","items":{"type":"object","additionalProperties":true},"description":"Models you can pass as `model`, with credit costs."}},"additionalProperties":true}}}},"400":{"description":"The request is invalid. `detail.error.code` says why (for example `invalid_request`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Not enough credits (`insufficient_credits`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The API key lacks the required scope (`scope_denied`) or the account cannot use this feature.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"The asset, job or run was not found or does not belong to you.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit or queue limit reached. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"tags":["Catalog"],"security":[{"apiKey":["generate"]}],"x-required-scope":"generate"}},"/v1/api/character-workflows":{"get":{"summary":"List guided character perspectives, animations, source views, and credit estimates","description":"List guided character perspectives, animations, source views, and credit estimates.","operationId":"getCharacterWorkflows","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"ApiCharacterWorkflowCatalog","type":"object","required":["workflows"],"properties":{"defaults":{"type":"object","additionalProperties":true},"workflows":{"type":"array","items":{"type":"object","additionalProperties":true},"description":"Character perspectives and their animation presets."},"source_views":{"type":"array","items":{"type":"object","additionalProperties":true}},"dependency_config":{"type":"object","additionalProperties":true}},"additionalProperties":true}}}},"400":{"description":"The request is invalid. `detail.error.code` says why (for example `invalid_request`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Not enough credits (`insufficient_credits`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The API key lacks the required scope (`scope_denied`) or the account cannot use this feature.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"The asset, job or run was not found or does not belong to you.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit or queue limit reached. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"tags":["Catalog"],"security":[{"apiKey":["generate"]}],"x-required-scope":"generate"}},"/v1/api/characters":{"post":{"summary":"Submit a guided base character generation job","description":"Submit a guided base character generation job.","operationId":"generateCharacter","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiCharacterGenerateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiJobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"400":{"description":"The request is invalid. `detail.error.code` says why (for example `invalid_request`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Not enough credits (`insufficient_credits`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The API key lacks the required scope (`scope_denied`) or the account cannot use this feature.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"The asset, job or run was not found or does not belong to you.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit or queue limit reached. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"tags":["Generation"],"security":[{"apiKey":["generate"]}],"x-required-scope":"generate"}},"/v1/api/characters/{character_id}/animations":{"post":{"summary":"Submit a guided animation run for a base character asset","description":"Submit a guided animation run for a base character asset.","operationId":"generateCharacterAnimations","parameters":[{"name":"character_id","in":"path","required":true,"schema":{"type":"string","title":"Character Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiCharacterAnimationsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiCharacterAnimationRun"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"400":{"description":"The request is invalid. `detail.error.code` says why (for example `invalid_request`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Not enough credits (`insufficient_credits`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The API key lacks the required scope (`scope_denied`) or the account cannot use this feature.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"The asset, job or run was not found or does not belong to you.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit or queue limit reached. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"tags":["Animation"],"security":[{"apiKey":["generate"]}],"x-required-scope":"generate"}},"/v1/api/character-animation-runs/{run_id}":{"get":{"summary":"Check the status of a guided character animation run","description":"Check the status of a guided character animation run.","operationId":"getCharacterAnimationRun","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiCharacterAnimationRun"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"400":{"description":"The request is invalid. `detail.error.code` says why (for example `invalid_request`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Not enough credits (`insufficient_credits`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The API key lacks the required scope (`scope_denied`) or the account cannot use this feature.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"The asset, job or run was not found or does not belong to you.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit or queue limit reached. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"tags":["Animation"],"security":[{"apiKey":["generate"]}],"x-required-scope":"generate"}},"/v1/api/generate":{"post":{"summary":"Submit a generation job","description":"Submit a generation job. Returns immediately with a job ID for polling.","operationId":"generate","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiGenerateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiJobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"400":{"description":"The request is invalid. `detail.error.code` says why (for example `invalid_request`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Not enough credits (`insufficient_credits`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The API key lacks the required scope (`scope_denied`) or the account cannot use this feature.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"The asset, job or run was not found or does not belong to you.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit or queue limit reached. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"tags":["Generation"],"security":[{"apiKey":["generate"]}],"x-required-scope":"generate"}},"/v1/api/tilesets/options":{"get":{"summary":"List supported tileset generation options and resolved output dimensions","description":"List supported tileset generation options and resolved output dimensions.","operationId":"getTilesetOptions","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"ApiTilesetOptions","type":"object","required":["styles"],"properties":{"defaults":{"type":"object","additionalProperties":true},"styles":{"type":"object","additionalProperties":true,"description":"Tileset styles with supported tile sizes and resolved output dimensions."}},"additionalProperties":true}}}},"400":{"description":"The request is invalid. `detail.error.code` says why (for example `invalid_request`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Not enough credits (`insufficient_credits`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The API key lacks the required scope (`scope_denied`) or the account cannot use this feature.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"The asset, job or run was not found or does not belong to you.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit or queue limit reached. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"tags":["Catalog"],"security":[{"apiKey":["generate"]}],"x-required-scope":"generate"}},"/v1/api/tilesets":{"post":{"summary":"Submit a tileset generation job","description":"Submit a tileset generation job. Returns immediately with a job ID for polling.","operationId":"generateTileset","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiTilesetGenerateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiJobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"400":{"description":"The request is invalid. `detail.error.code` says why (for example `invalid_request`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Not enough credits (`insufficient_credits`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The API key lacks the required scope (`scope_denied`) or the account cannot use this feature.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"The asset, job or run was not found or does not belong to you.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit or queue limit reached. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"tags":["Generation"],"security":[{"apiKey":["generate"]}],"x-required-scope":"generate"}},"/v1/api/animate":{"post":{"summary":"Submit an animation job","description":"Submit an animation job. Returns immediately with a job ID for polling.","operationId":"animate","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiAnimateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiJobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"400":{"description":"The request is invalid. `detail.error.code` says why (for example `invalid_request`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Not enough credits (`insufficient_credits`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The API key lacks the required scope (`scope_denied`) or the account cannot use this feature.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"The asset, job or run was not found or does not belong to you.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit or queue limit reached. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"tags":["Animation"],"security":[{"apiKey":["generate"]}],"x-required-scope":"generate"}},"/v1/api/remove-background":{"post":{"summary":"Submit a standalone basic background-removal job","description":"Submit a standalone basic background-removal job.","operationId":"removeBackground","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiJobResponse"}}}},"400":{"description":"The request is invalid. `detail.error.code` says why (for example `invalid_request`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Not enough credits (`insufficient_credits`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The API key lacks the required scope (`scope_denied`) or the account cannot use this feature.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"The asset, job or run was not found or does not belong to you.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit or queue limit reached. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"tags":["Assets"],"security":[{"apiKey":["generate"]}],"x-required-scope":"generate","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiRemoveBackgroundRequest"}},"multipart/form-data":{"schema":{"type":"object","description":"Same fields as ApiRemoveBackgroundRequest, with the image sent as a `file` upload instead of base64 `image`.","properties":{"file":{"type":"string","format":"binary"}},"additionalProperties":true}}}}}},"/v1/api/assets/import":{"post":{"summary":"Import an image into SpriteCook as an owned asset, then use its asset_id in MCP or animation calls","description":"Import an image into SpriteCook as an owned asset, then use its asset_id in MCP or animation calls.","operationId":"importAsset","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiAssetInfo"}}}},"400":{"description":"The request is invalid. `detail.error.code` says why (for example `invalid_request`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Not enough credits (`insufficient_credits`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The API key lacks the required scope (`scope_denied`) or the account cannot use this feature.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"The asset, job or run was not found or does not belong to you.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit or queue limit reached. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"tags":["Assets"],"security":[{"apiKey":["generate"]}],"x-required-scope":"generate","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiImportAssetRequest"}},"multipart/form-data":{"schema":{"type":"object","description":"Same fields as ApiImportAssetRequest, with the image sent as a `file` upload instead of base64 `image`.","properties":{"file":{"type":"string","format":"binary"}},"additionalProperties":true}}}}}},"/v1/api/assets/{asset_id}/auto-slice":{"post":{"summary":"Auto-detect separate alpha components and save them as private SpriteCook assets","description":"Auto-detect separate alpha components and save them as private SpriteCook assets.","operationId":"autoSliceAsset","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","title":"Asset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiAutoSliceResponse"}}}},"400":{"description":"Invalid request options or unsupported source asset."},"403":{"description":"Asset access denied or free slicer allowance exhausted."},"404":{"description":"Asset or selected source content not found."},"422":{"description":"Automatic detection could not safely create multiple slices."},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Not enough credits (`insufficient_credits`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit or queue limit reached. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"source_variant":{"default":"auto","description":"Source image variant. Auto uses raw animation sheets and prefers pixel variants for still images.","enum":["auto","raw","pixel"],"title":"Source Variant","type":"string"},"alpha_threshold":{"default":1,"description":"Minimum alpha value treated as visible.","maximum":255,"minimum":0,"title":"Alpha Threshold","type":"integer"},"min_area":{"default":24,"description":"Smallest connected component to keep, in pixels.","maximum":1000000,"minimum":1,"title":"Min Area","type":"integer"},"padding":{"default":0,"description":"Transparent context added around each detected slice.","maximum":256,"minimum":0,"title":"Padding","type":"integer"},"merge_distance":{"default":1,"description":"Maximum gap used to merge nearby alpha components.","maximum":256,"minimum":0,"title":"Merge Distance","type":"integer"}},"title":"ApiAutoSliceRequest","type":"object"}}}},"tags":["Assets"],"security":[{"apiKey":["generate"]}],"x-required-scope":"generate"}},"/v1/api/jobs/{job_id}":{"get":{"summary":"Check the status of a generation or animation job","description":"Check the status of a generation or animation job.","operationId":"getJob","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiJobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"400":{"description":"The request is invalid. `detail.error.code` says why (for example `invalid_request`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Not enough credits (`insufficient_credits`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The API key lacks the required scope (`scope_denied`) or the account cannot use this feature.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"The asset, job or run was not found or does not belong to you.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit or queue limit reached. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"tags":["Jobs"],"security":[{"apiKey":["read_assets"]}],"x-required-scope":"read_assets"}},"/v1/api/jobs/{job_id}/cancel":{"post":{"summary":"Cancel a queued or running job through the public API","description":"Cancel a queued or running job through the public API.","operationId":"cancelJob","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"ApiCancelJobResponse","type":"object","required":["ok"],"properties":{"ok":{"type":"boolean","description":"True when the cancel request was accepted."},"cancelled":{"type":"boolean","description":"True when the job stopped immediately."},"cancellation_pending":{"type":"boolean","description":"True when a running job will stop shortly."}},"additionalProperties":true}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"400":{"description":"The request is invalid. `detail.error.code` says why (for example `invalid_request`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Not enough credits (`insufficient_credits`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The API key lacks the required scope (`scope_denied`) or the account cannot use this feature.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"The asset, job or run was not found or does not belong to you.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit or queue limit reached. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"tags":["Jobs"],"security":[{"apiKey":["generate"]}],"x-required-scope":"generate"}},"/v1/api/assets/recent":{"get":{"summary":"List your most recent assets","description":"List your most recent assets.","operationId":"getRecentAssets","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum number of recent assets to return","default":10,"title":"Limit"},"description":"Maximum number of recent assets to return"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiRecentAssetsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"400":{"description":"The request is invalid. `detail.error.code` says why (for example `invalid_request`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Not enough credits (`insufficient_credits`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The API key lacks the required scope (`scope_denied`) or the account cannot use this feature.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"The asset, job or run was not found or does not belong to you.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit or queue limit reached. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"tags":["Assets"],"security":[{"apiKey":["read_assets"]}],"x-required-scope":"read_assets"}},"/v1/api/assets/{asset_id}/alpha-cutoff":{"put":{"summary":"Save edge cleanup from the preserved source without a provider call or credit charge","description":"Save edge cleanup from the preserved source without a provider call or credit charge.","operationId":"setAssetAlphaCutoff","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","title":"Asset Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSetAlphaCutoffRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiAssetMetadata"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"400":{"description":"The request is invalid. `detail.error.code` says why (for example `invalid_request`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Not enough credits (`insufficient_credits`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The API key lacks the required scope (`scope_denied`) or the account cannot use this feature.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"The asset, job or run was not found or does not belong to you.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit or queue limit reached. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"tags":["Generation"],"security":[{"apiKey":["generate"]}],"x-required-scope":"generate"}},"/v1/api/assets/{asset_id}":{"get":{"summary":"Get metadata for one owned SpriteCook asset by ID","description":"Get metadata for one owned SpriteCook asset by ID.","operationId":"getAssetMetadata","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","title":"Asset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiAssetMetadata"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"400":{"description":"The request is invalid. `detail.error.code` says why (for example `invalid_request`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Not enough credits (`insufficient_credits`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The API key lacks the required scope (`scope_denied`) or the account cannot use this feature.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"The asset, job or run was not found or does not belong to you.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit or queue limit reached. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"tags":["Assets"],"security":[{"apiKey":["read_assets"]}],"x-required-scope":"read_assets"}},"/v1/api/credits":{"get":{"summary":"Check your current credit balance and subscription tier","description":"Check your current credit balance and subscription tier.","operationId":"getCredits","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiCreditsResponse"}}}},"400":{"description":"The request is invalid. `detail.error.code` says why (for example `invalid_request`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Not enough credits (`insufficient_credits`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The API key lacks the required scope (`scope_denied`) or the account cannot use this feature.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"The asset, job or run was not found or does not belong to you.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit or queue limit reached. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"tags":["Account"],"security":[{"apiKey":["read_credits"]}],"x-required-scope":"read_credits"}},"/v1/api/generate-sync":{"post":{"summary":"Generate art and wait up to 90 seconds for the result","description":"Generate art and wait up to 90 seconds for the result.","operationId":"generateSync","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiGenerateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiJobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"400":{"description":"The request is invalid. `detail.error.code` says why (for example `invalid_request`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Not enough credits (`insufficient_credits`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The API key lacks the required scope (`scope_denied`) or the account cannot use this feature.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"The asset, job or run was not found or does not belong to you.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit or queue limit reached. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"tags":["Generation"],"security":[{"apiKey":["generate"]}],"x-required-scope":"generate"}},"/v1/api/tilesets-sync":{"post":{"summary":"Generate a tileset and wait up to 90 seconds for the result","description":"Generate a tileset and wait up to 90 seconds for the result.","operationId":"generateTilesetSync","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiTilesetGenerateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiJobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"400":{"description":"The request is invalid. `detail.error.code` says why (for example `invalid_request`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Not enough credits (`insufficient_credits`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The API key lacks the required scope (`scope_denied`) or the account cannot use this feature.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"The asset, job or run was not found or does not belong to you.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit or queue limit reached. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"tags":["Generation"],"security":[{"apiKey":["generate"]}],"x-required-scope":"generate"}},"/v1/api/animate-sync":{"post":{"summary":"Generate an animation and wait up to 90 seconds for the result","description":"Generate an animation and wait up to 90 seconds for the result.","operationId":"animateSync","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiAnimateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiJobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"400":{"description":"The request is invalid. `detail.error.code` says why (for example `invalid_request`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Not enough credits (`insufficient_credits`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The API key lacks the required scope (`scope_denied`) or the account cannot use this feature.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"The asset, job or run was not found or does not belong to you.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit or queue limit reached. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"tags":["Animation"],"security":[{"apiKey":["generate"]}],"x-required-scope":"generate"}}},"components":{"schemas":{"ApiAlphaEditing":{"properties":{"available":{"type":"boolean","title":"Available"},"unavailable_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unavailable Reason"},"current_cutoff":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Current Cutoff"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"},"processing":{"anyOf":[{"type":"string","enum":["binary_alpha_v1","tileset_color_tolerance_v1"]},{"type":"null"}],"title":"Processing"},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url"},"source_url_expires_in":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Source Url Expires In"},"source_layout":{"anyOf":[{"type":"string","enum":["image","horizontal_spritesheet"]},{"type":"null"}],"title":"Source Layout"},"preview_crop":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Preview Crop"},"frame_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Frame Count"},"frame_width":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Frame Width"},"frame_height":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Frame Height"},"credits_required":{"type":"integer","title":"Credits Required","default":0}},"type":"object","required":["available"],"title":"ApiAlphaEditing"},"ApiAnimateRequest":{"properties":{"image":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Image","description":"Deprecated inline image field. Animate now requires a SpriteCook asset_id."},"asset_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Id","description":"Existing SpriteCook asset ID to animate. The asset must belong to the authenticated user."},"prompt":{"type":"string","maxLength":3000,"minLength":1,"title":"Prompt","description":"Describe the desired animation"},"auto_enhance_prompt":{"type":"boolean","title":"Auto Enhance Prompt","description":"When true, SpriteCook inspects the source asset and expands short prompts like 'Idle' into a fuller animation prompt.","default":true},"edge_margin":{"type":"integer","maximum":25.0,"minimum":0.0,"title":"Edge Margin","description":"Add spacing on all sides before animation as a percentage of the trimmed source size.","default":6},"pixel":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Pixel","description":"Animation mode override. If asset_id is provided and pixel is omitted, mode is inferred from the asset."},"model":{"anyOf":[{"type":"string","enum":["pixel-engine-v1.1","frame-engine-v1.1","pixel-engine-v1.5"]},{"type":"null"}],"title":"Model","description":"Animation model: pixel-engine-v1.1, frame-engine-v1.1, pixel-engine-v1.5. Omit to use pixel-engine-v1.1 for pixel art or frame-engine-v1.1 for detailed art."},"output_frames":{"type":"integer","maximum":24.0,"minimum":2.0,"title":"Output Frames","description":"Output frame count. Frame count rules by model: pixel-engine-v1.1: pixel 2 to 16 (even counts); frame-engine-v1.1: detailed 2 to 24 (even counts); pixel-engine-v1.5: pixel 3 to 16 (any whole number), detailed 3 to 16 (any whole number). When model is omitted, pixel defaults to pixel-engine-v1.1, detailed defaults to frame-engine-v1.1.","default":8},"output_format":{"type":"string","enum":["webp","gif","spritesheet"],"title":"Output Format","description":"Provider output format","default":"webp"},"negative_prompt":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Negative Prompt","description":"Optional negative prompt","default":""},"matte_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matte Color","description":"Hex matte color used to flatten alpha before processing","default":"#808080"},"removebg":{"type":"string","title":"Removebg","description":"Background removal mode: None, Basic, or Pro","default":"Basic"},"colors":{"type":"integer","maximum":256.0,"minimum":2.0,"title":"Colors","description":"Pixel palette size. Only valid when pixel=true","default":24},"use_random_seed":{"type":"boolean","title":"Use Random Seed","description":"When true, the server generates a fresh random seed for this animation.","default":true},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed","description":"Custom reproducibility seed. Required when use_random_seed is false."},"runpod_alpha_threshold_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Runpod Alpha Threshold Enabled","description":"Alpha threshold toggle for Basic background removal during cleanup. Defaults to true for the public API. When false, runpod_alpha_cutoff is ignored."},"runpod_alpha_cutoff":{"anyOf":[{"type":"integer","maximum":255.0,"minimum":0.0},{"type":"null"}],"title":"Runpod Alpha Cutoff","description":"Binary alpha cutoff for Basic background removal during cleanup. Defaults to 96 for the public API when runpod_alpha_threshold_enabled is true."}},"type":"object","required":["prompt"],"title":"ApiAnimateRequest"},"ApiAnimationOutput":{"properties":{"asset_id":{"type":"string","title":"Asset Id"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"spritesheet_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Spritesheet Url"},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Type"},"metadata":{"$ref":"#/components/schemas/ApiAnimationOutputMetadata"}},"type":"object","required":["asset_id","metadata"],"title":"ApiAnimationOutput"},"ApiAnimationOutputMetadata":{"properties":{"frame_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Frame Count"},"fps":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fps"},"frame_width":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Frame Width"},"frame_height":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Frame Height"},"animation_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Animation Mode"}},"type":"object","title":"ApiAnimationOutputMetadata"},"ApiAssetInfo":{"properties":{"id":{"type":"string","title":"Id"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"sprite_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sprite Url"},"spritesheet_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Spritesheet Url"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"file_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Name"},"width":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Width"},"height":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Height"},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"asset_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Kind"},"tilesetKind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tilesetkind"},"tilesetPieceSet":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tilesetpieceset"},"tilesetPerspective":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tilesetperspective"},"tilesetElevation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tilesetelevation"},"tilesetTileSize":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tilesettilesize"},"tilesetStyleMode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tilesetstylemode"},"tilesetGridSize":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tilesetgridsize"},"tilesetGridWidth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tilesetgridwidth"},"tilesetGridHeight":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tilesetgridheight"},"tilesetOutputSize":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tilesetoutputsize"},"tilesetOutputWidth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tilesetoutputwidth"},"tilesetOutputHeight":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tilesetoutputheight"},"tilesetAtlasColumns":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tilesetatlascolumns"},"tilesetAtlasRows":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tilesetatlasrows"},"tilesetEdges":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tilesetedges"}},"type":"object","required":["id"],"title":"ApiAssetInfo"},"ApiAssetMetadata":{"properties":{"id":{"type":"string","title":"Id"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"sprite_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sprite Url"},"spritesheet_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Spritesheet Url"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"file_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Name"},"width":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Width"},"height":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Height"},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"asset_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Kind"},"tilesetKind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tilesetkind"},"tilesetPieceSet":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tilesetpieceset"},"tilesetPerspective":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tilesetperspective"},"tilesetElevation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tilesetelevation"},"tilesetTileSize":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tilesettilesize"},"tilesetStyleMode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tilesetstylemode"},"tilesetGridSize":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tilesetgridsize"},"tilesetGridWidth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tilesetgridwidth"},"tilesetGridHeight":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tilesetgridheight"},"tilesetOutputSize":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tilesetoutputsize"},"tilesetOutputWidth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tilesetoutputwidth"},"tilesetOutputHeight":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tilesetoutputheight"},"tilesetAtlasColumns":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tilesetatlascolumns"},"tilesetAtlasRows":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tilesetatlasrows"},"tilesetEdges":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tilesetedges"},"alpha_editing":{"anyOf":[{"$ref":"#/components/schemas/ApiAlphaEditing"},{"type":"null"}]},"raw_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Raw Url"},"pixel_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pixel Url"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"original_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Original Prompt"},"theme_snapshot":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Theme Snapshot"},"style_snapshot":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Style Snapshot"},"bg_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bg Mode"},"pixel_flag":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Pixel Flag"},"intent_size":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Intent Size"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"reference_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reference Type"},"ref_asset_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ref Asset Id"},"base_asset_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Asset Id"},"is_public":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Public"},"style_ref_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Style Ref Url"},"mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mode"},"ui_element_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ui Element Type"},"color_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Color Count"},"animation_frame_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Animation Frame Count"},"animation_fps":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Animation Fps"},"animation_frame_width":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Animation Frame Width"},"animation_frame_height":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Animation Frame Height"},"animation_preview_format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Animation Preview Format"},"animation_spritesheet_format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Animation Spritesheet Format"},"animation_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Animation Mode"}},"type":"object","required":["id"],"title":"ApiAssetMetadata"},"ApiAutoSliceDetection":{"properties":{"method":{"type":"string","const":"connected_alpha","title":"Method","default":"connected_alpha"},"source_variant":{"type":"string","enum":["raw","pixel"],"title":"Source Variant"},"mode":{"type":"string","enum":["flat_image","animation_frames"],"title":"Mode"},"alpha_threshold":{"type":"integer","title":"Alpha Threshold"},"min_area":{"type":"integer","title":"Min Area"},"padding":{"type":"integer","title":"Padding"},"merge_distance":{"type":"integer","title":"Merge Distance"},"smart_alpha":{"type":"boolean","title":"Smart Alpha"},"rectangles":{"items":{"$ref":"#/components/schemas/ApiAutoSliceRectangle"},"type":"array","title":"Rectangles"}},"type":"object","required":["source_variant","mode","alpha_threshold","min_area","padding","merge_distance","smart_alpha","rectangles"],"title":"ApiAutoSliceDetection"},"ApiAutoSliceRectangle":{"properties":{"x":{"type":"integer","minimum":0.0,"title":"X"},"y":{"type":"integer","minimum":0.0,"title":"Y"},"width":{"type":"integer","minimum":1.0,"title":"Width"},"height":{"type":"integer","minimum":1.0,"title":"Height"},"name":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Name"}},"type":"object","required":["x","y","width","height"],"title":"ApiAutoSliceRectangle"},"ApiAutoSliceResponse":{"properties":{"source_asset_id":{"type":"string","title":"Source Asset Id"},"assets":{"items":{"$ref":"#/components/schemas/ApiAssetInfo"},"type":"array","title":"Assets"},"count":{"type":"integer","title":"Count"},"detection":{"$ref":"#/components/schemas/ApiAutoSliceDetection"},"manual_slice_url":{"type":"string","title":"Manual Slice Url"},"slicer_quota":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Slicer Quota"},"message":{"type":"string","title":"Message"},"created_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Created Count"},"warning":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Warning"}},"type":"object","required":["source_asset_id","assets","count","detection","manual_slice_url","message"],"title":"ApiAutoSliceResponse"},"ApiBackgroundRemovalFile":{"properties":{"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Type"},"media_kind":{"type":"string","enum":["image","animation"],"title":"Media Kind"},"width":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Width"},"height":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Height"},"frame_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Frame Count"},"fps":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fps"}},"type":"object","required":["media_kind"],"title":"ApiBackgroundRemovalFile"},"ApiCharacterAnimationsRequest":{"properties":{"perspective":{"type":"string","enum":["platformer","isometric","topdown"],"title":"Perspective","description":"Perspective workflow used for the base character"},"animation_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Animation Ids","description":"Preset animation ids for this perspective"},"custom_animations":{"anyOf":[{"items":{"$ref":"#/components/schemas/ApiCustomCharacterAnimationRequest"},"type":"array"},{"type":"null"}],"title":"Custom Animations","description":"Prompt-driven custom animations"},"bg_removal_provider":{"anyOf":[{"type":"string","pattern":"^(basic|photoroom)$"},{"type":"null"}],"title":"Bg Removal Provider","default":"basic"},"photoroom_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Photoroom Mode","description":"Reserved for photoroom mode; currently forced to per_frame"}},"type":"object","required":["perspective"],"title":"ApiCharacterAnimationsRequest"},"ApiCharacterGenerateRequest":{"properties":{"prompt":{"type":"string","maxLength":5000,"minLength":1,"title":"Prompt","description":"Character description"},"perspective":{"type":"string","enum":["platformer","isometric","topdown"],"title":"Perspective","description":"Character perspective workflow"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model","description":"Generation model. Defaults to gemini-nano-banana-2.1"},"quality":{"type":"string","pattern":"^(low|medium|high)$","title":"Quality","description":"GPT Image 2 quality tier","default":"medium"}},"type":"object","required":["prompt","perspective"],"title":"ApiCharacterGenerateRequest"},"ApiCreditsResponse":{"properties":{"total":{"type":"integer","title":"Total"},"subscription_credits":{"type":"integer","title":"Subscription Credits"},"topup_credits":{"type":"integer","title":"Topup Credits"},"tier":{"type":"string","title":"Tier"},"concurrent_jobs":{"type":"integer","title":"Concurrent Jobs","default":1}},"type":"object","required":["total","subscription_credits","topup_credits","tier"],"title":"ApiCreditsResponse"},"ApiCustomCharacterAnimationRequest":{"properties":{"id":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Id","description":"Optional stable id suffix for the custom animation"},"label":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Label","description":"Display label for the custom animation"},"prompt":{"type":"string","maxLength":3000,"minLength":1,"title":"Prompt","description":"Animation prompt"},"source_view":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source View","description":"Source view to animate from. Defaults to front_idle"},"output_frames":{"type":"integer","multipleOf":2.0,"maximum":16.0,"minimum":2.0,"title":"Output Frames","description":"Output frame count, 2 to 16, even counts only (pixel-engine-v1.1)","default":8}},"type":"object","required":["prompt"],"title":"ApiCustomCharacterAnimationRequest"},"ApiGenerateRequest":{"properties":{"prompt":{"type":"string","maxLength":5000,"minLength":1,"title":"Prompt","description":"What to generate, e.g. 'a medieval iron sword, side view'"},"width":{"type":"integer","maximum":512.0,"minimum":16.0,"title":"Width","description":"Requested/fallback width hint in pixels. The final asset width can differ.","default":64},"height":{"type":"integer","maximum":512.0,"minimum":16.0,"title":"Height","description":"Requested/fallback height hint in pixels. The final asset height can differ.","default":64},"variations":{"type":"integer","maximum":4.0,"minimum":1.0,"title":"Variations","description":"Number of image variations to generate","default":1},"pixel":{"type":"boolean","title":"Pixel","description":"True for pixel art with crisp edges and grid alignment. False for detailed/HD art with smooth gradients and fine detail","default":true},"pixel_perfect":{"type":"boolean","title":"Pixel Perfect","description":"Apply pixel-perfect grid alignment post-processing (only applies when pixel=True)","default":true},"bg_mode":{"type":"string","pattern":"^(transparent|white|include)$","title":"Bg Mode","description":"Background mode: transparent, white, or include","default":"transparent"},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id","description":"Assign generated assets to a project"},"theme":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Theme","description":"Art theme/setting context, e.g. 'dark fantasy medieval'"},"style":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Style","description":"Art style direction, e.g. '16-bit SNES style'"},"aspect_ratio":{"type":"string","pattern":"^(1:1|16:9|9:16)$","title":"Aspect Ratio","description":"Aspect ratio for generation","default":"1:1"},"smart_crop":{"type":"boolean","title":"Smart Crop","description":"Auto-crop output to content bounds","default":true},"smart_crop_mode":{"type":"string","pattern":"^(tightest|power_of_2)$","title":"Smart Crop Mode","description":"Crop mode","default":"tightest"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model","description":"AI model to use. Defaults to gemini-nano-banana-2.1"},"mode":{"type":"string","pattern":"^(assets|texture|ui)$","title":"Mode","description":"Generation mode: assets, texture, or ui","default":"assets"},"resolution":{"type":"string","pattern":"^(1K|2K|4K)$","title":"Resolution","description":"Output resolution tier","default":"1K"},"quality":{"type":"string","pattern":"^(low|medium|high)$","title":"Quality","description":"GPT Image 2 quality tier","default":"medium"},"colors":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":64},{"type":"null"}],"title":"Colors","description":"Color palette constraint, list of hex codes (max 64)"},"style_asset_ids":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":14},{"type":"null"}],"title":"Style Asset Ids","description":"Owned style guide images; combined with context/edit images up to the model reference limit"},"reference_asset_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reference Asset Id","description":"Asset ID to use as one specific visual/context reference"},"edit_asset_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Edit Asset Id","description":"Asset ID to edit with the explicit request settings. Exact source geometry is best-effort rather than guaranteed."},"runpod_alpha_threshold_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Runpod Alpha Threshold Enabled","description":"Alpha threshold toggle for Basic background removal. Defaults to true for the public API. When false, runpod_alpha_cutoff is ignored."},"runpod_alpha_cutoff":{"anyOf":[{"type":"integer","maximum":255.0,"minimum":0.0},{"type":"null"}],"title":"Runpod Alpha Cutoff","description":"Binary alpha cutoff for Basic background removal. Defaults to 96 for the public API when runpod_alpha_threshold_enabled is true."}},"type":"object","required":["prompt"],"title":"ApiGenerateRequest"},"ApiJobResponse":{"properties":{"job_id":{"type":"string","title":"Job Id"},"status":{"type":"string","title":"Status"},"progress":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Progress"},"character_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Character Id"},"assets":{"anyOf":[{"items":{"$ref":"#/components/schemas/ApiAssetInfo"},"type":"array"},{"type":"null"}],"title":"Assets"},"output":{"anyOf":[{"$ref":"#/components/schemas/ApiAnimationOutput"},{"type":"null"}]},"file":{"anyOf":[{"$ref":"#/components/schemas/ApiBackgroundRemovalFile"},{"type":"null"}]},"error":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Error"},"credits_used":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Credits Used"},"credits_remaining":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Credits Remaining"},"poll_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Poll Url"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"finished_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Finished At"}},"type":"object","required":["job_id","status"],"title":"ApiJobResponse"},"ApiRecentAssetsResponse":{"properties":{"assets":{"items":{"$ref":"#/components/schemas/ApiAssetInfo"},"type":"array","title":"Assets"}},"type":"object","required":["assets"],"title":"ApiRecentAssetsResponse"},"ApiSetAlphaCutoffRequest":{"properties":{"cutoff":{"type":"integer","maximum":255.0,"minimum":0.0,"title":"Cutoff"}},"type":"object","required":["cutoff"],"title":"ApiSetAlphaCutoffRequest"},"ApiTilesetGenerateRequest":{"properties":{"prompt":{"type":"string","maxLength":5000,"minLength":1,"title":"Prompt","description":"What tileset to generate, e.g. 'mossy dungeon floor'"},"style_mode":{"anyOf":[{"type":"string","enum":["pixel","detailed"]},{"type":"null"}],"title":"Style Mode","description":"pixel for pixel art tilesets, detailed for HD/game-art tilesets"},"perspective":{"anyOf":[{"type":"string","enum":["topdown","platformer","isometric"]},{"type":"null"}],"title":"Perspective","description":"Tileset perspective"},"piece_set":{"anyOf":[{"type":"string","enum":["15-piece","17-piece-base","autotile-16-set","isometric-3x5-32","isometric-2x4-64"]},{"type":"null"}],"title":"Piece Set","description":"Tileset layout"},"tile_size":{"anyOf":[{"type":"integer","maximum":512.0,"minimum":1.0},{"type":"null"}],"title":"Tile Size","description":"Final tile size in pixels"},"elevation":{"anyOf":[{"type":"string","enum":["no-elevation","minimal"]},{"type":"null"}],"title":"Elevation","description":"Top-down elevation style when supported"},"edges":{"anyOf":[{"type":"string","enum":["transparent","two_surfaces"]},{"type":"null"}],"title":"Edges","description":"transparent for terrain-to-alpha, two_surfaces for terrain A to terrain B where supported","default":"transparent"},"variations":{"type":"integer","maximum":4.0,"minimum":1.0,"title":"Variations","description":"Number of tileset variations to generate","default":1},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id","description":"Assign generated tilesets to a project"},"theme":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Theme","description":"Optional theme context"},"style":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Style","description":"Optional style direction"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model","description":"Optional AI model override. Defaults to the tileset registry model."},"colors":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":64},{"type":"null"}],"title":"Colors","description":"Color palette guidance, list of hex codes (max 64)"},"force_enabled":{"type":"boolean","title":"Force Enabled","description":"Force the output palette toward force_colors","default":false},"force_colors":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":64},{"type":"null"}],"title":"Force Colors","description":"Palette colors to force, list of hex codes (max 64)"},"force_automatic":{"type":"boolean","title":"Force Automatic","description":"When true, infer a constrained palette size automatically","default":false},"force_color_count":{"anyOf":[{"type":"integer","maximum":64.0,"minimum":1.0},{"type":"null"}],"title":"Force Color Count","description":"Forced palette color count"},"reference_asset_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reference Asset Id","description":"Existing tileset asset to use as a source/reference. Settings are inherited from this asset."},"edit_asset_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Edit Asset Id","description":"Existing tileset asset to edit. Settings are inherited from this asset."},"style_asset_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Style Asset Id","description":"Existing asset to use as visual style guide only"}},"type":"object","required":["prompt"],"title":"ApiTilesetGenerateRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"ApiError":{"title":"ApiError","type":"object","required":["detail"],"properties":{"detail":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","description":"Stable machine-readable error code, for example `insufficient_credits`."},"message":{"type":"string","description":"Human-readable explanation."},"details":{"type":"object","additionalProperties":true}}}}}}},"ApiCharacterAnimationRun":{"title":"ApiCharacterAnimationRun","type":"object","required":["status"],"properties":{"id":{"type":["string","null"],"description":"Run ID. Poll GET /v1/api/character-animation-runs/{run_id}."},"status":{"type":"string","description":"queued, running, completed, failed or cancelled."},"character_id":{"type":["string","null"]},"source_asset_id":{"type":["string","null"]},"preset_pack_id":{"type":["string","null"]},"preset_ids":{"type":"array","items":{"type":"string"}},"items":{"type":"array","items":{"type":"object","additionalProperties":true},"description":"One entry per requested animation."},"result_asset_ids":{"type":"array","items":{"type":"string"}},"credits_reserved":{"type":["integer","null"]},"credits_remaining":{"type":["integer","null"]},"error_message":{"type":["string","null"]}},"additionalProperties":true},"ApiImportAssetRequest":{"properties":{"image":{"description":"Base64-encoded image or data URL to import as a SpriteCook asset.","minLength":1,"title":"Image","type":"string"},"pixel":{"default":true,"description":"Mark the imported asset as pixel art. Set false for detailed/HD source art.","title":"Pixel","type":"boolean"},"display_name":{"anyOf":[{"maxLength":120,"type":"string"},{"type":"null"}],"default":null,"description":"Optional display name for the imported asset.","title":"Display Name"},"file_name":{"anyOf":[{"maxLength":120,"type":"string"},{"type":"null"}],"default":null,"description":"Optional original file name. Used for asset labeling only.","title":"File Name"},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Optional project to assign the imported asset to.","title":"Project Id"}},"required":["image"],"title":"ApiImportAssetRequest","type":"object"},"ApiRemoveBackgroundRequest":{"properties":{"asset_id":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Existing SpriteCook asset ID to clean up. The asset must belong to the authenticated user.","title":"Asset Id"},"image":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Base64-encoded still image or animated WebP, optionally as a data URL.","title":"Image"},"runpod_alpha_threshold_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"Alpha threshold toggle for Basic background removal. Defaults to true for the public API. When false, runpod_alpha_cutoff is ignored.","title":"Runpod Alpha Threshold Enabled"},"runpod_alpha_cutoff":{"anyOf":[{"maximum":255,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Binary alpha cutoff for Basic background removal. Defaults to 96 for the public API when runpod_alpha_threshold_enabled is true.","title":"Runpod Alpha Cutoff"}},"title":"ApiRemoveBackgroundRequest","type":"object"}},"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","bearerFormat":"sc_live_ API key","description":"SpriteCook API key sent as `Authorization: Bearer sc_live_...`. Create one at https://app.spritecook.ai/api-keys and grant only the scopes you need. Each operation lists its required scope in `security`.\n\n- `generate`: Create, animate, import, slice and clean up assets, and manage the jobs they start. Spends credits.\n- `read_assets`: Read metadata and download URLs for assets you own.\n- `read_credits`: Read your credit balance.\n- `report_errors`: Send integration error reports to SpriteCook (used by the MCP server)."}}},"tags":[{"name":"Catalog","description":"Models, workflows and options you can pass to generation calls."},{"name":"Generation","description":"Generate still assets, characters and tilesets."},{"name":"Animation","description":"Animate existing assets and characters."},{"name":"Assets","description":"Import, inspect, slice and clean up assets you own."},{"name":"Jobs","description":"Poll and cancel asynchronous jobs."},{"name":"Account","description":"Credit balance."}],"externalDocs":{"description":"API guide with examples","url":"https://www.spritecook.ai/api-docs"},"x-spritecook-scopes":{"generate":"Create, animate, import, slice and clean up assets, and manage the jobs they start. Spends credits.","read_assets":"Read metadata and download URLs for assets you own.","read_credits":"Read your credit balance.","report_errors":"Send integration error reports to SpriteCook (used by the MCP server)."},"security":[{"apiKey":[]}]}