{"openapi":"3.1.0","info":{"title":"GameTorch v2 API","description":"Generate game-ready sprites, sounds and animations. Auth with `Authorization: Bearer <Clerk session token or gt2_ API key>`. Amounts are billed in credits (100 credits = $1); jobs reserve credits up front and settle to the actual cost. Agents: there is intentionally no MCP server — use an API key with an optional spend limit and point at /llms-full.txt or these docs. Tooling: the official `gametorch` CLI is recommended when a human is in the loop — a person can inspect and steer each step, and every operation is a command with `--json` output (install with `cargo install gametorch-cli`, or from source at https://github.com/gametorch/gametorch-rs). For programmatic, repeated, hands-off automation with no human in the loop, use a first-party SDK instead: Python `pip install gametorch`, TypeScript/JavaScript `npm install gametorch`, Go `go get github.com/gametorch/gogametorch`, or Rust `gametorch` on crates.io. SDKs add typed models, polite rate limiting and retries, cursor pagination, exact decimal money and project key-scope constructors. Source, examples and docs: https://github.com/gametorch. Rate limits (per account): expensive dispatches (generation, sound and animation creates, and animation exports) allow 1 request/second per route; all GET reads (single-item and list reads, usage, and asset/audio/animation content) share a token bucket of a 10,000-request burst refilled at 1,000 requests/second; writes (project/label/key/art-style/saved-animation creation, archive toggles, metadata) share a token bucket of a 100-request burst refilled at 5 requests/second. At most 25 concurrent holds and 5 concurrent animation-frame generations per account. Exceeding a limit returns 429. GameTorch's own models may cold-start after inactivity: the first run can take a few seconds, then about 0.2 seconds each; a run reports `warming` while it waits.","contact":{"name":"GameTorch Support","email":"support@gametorch.app"},"license":{"name":""},"version":"1.0.0"},"servers":[{"url":"/api","description":"This server"}],"paths":{"/animation-models":{"get":{"tags":["Catalog"],"summary":"List animation models","operationId":"list_animation_models","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnimationCatalog"}}}}}}},"/animation-run-frames/{id}/content":{"get":{"tags":["Animations"],"summary":"Animation frames content","operationId":"animation_frames_content","parameters":[{"name":"id","in":"path","description":"Animation frames id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Binary content"},"429":{"description":"Rate limit exceeded"}}}},"/animation-runs/{id}":{"get":{"tags":["Animations"],"summary":"Get animation","operationId":"get_animation","parameters":[{"name":"id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnimationGeneration"}}}},"429":{"description":"Rate limit exceeded"}}},"delete":{"tags":["Animations"],"summary":"Delete animation","operationId":"delete_animation","parameters":[{"name":"id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Deleted"}}}},"/animation-runs/{id}/archive":{"post":{"tags":["Animations"],"summary":"Archive animation","operationId":"archive_animation","parameters":[{"name":"id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArchiveResponse"}}}},"429":{"description":"Rate limit exceeded"}}}},"/animation-runs/{id}/content":{"get":{"tags":["Animations"],"summary":"Animation content","operationId":"animation_content","parameters":[{"name":"id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Binary content"},"429":{"description":"Rate limit exceeded"}}}},"/animation-runs/{id}/export-plan":{"post":{"tags":["Animations"],"summary":"Animation export plan","operationId":"animation_export_plan","parameters":[{"name":"id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportRangeRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportPlan"}}}},"429":{"description":"Rate limit exceeded"}}}},"/animation-runs/{id}/export/aseprite":{"post":{"tags":["Animations"],"summary":"Animation export aseprite","operationId":"animation_export_aseprite","parameters":[{"name":"id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportRangeRequest"}}},"required":true},"responses":{"200":{"description":"Binary content"},"429":{"description":"Rate limit exceeded"}}}},"/animation-runs/{id}/export/gamemaker":{"post":{"tags":["Animations"],"summary":"Animation export gamemaker","operationId":"animation_export_gamemaker","parameters":[{"name":"id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportRangeRequest"}}},"required":true},"responses":{"200":{"description":"Binary content"},"429":{"description":"Rate limit exceeded"}}}},"/animation-runs/{id}/export/godot":{"post":{"tags":["Animations"],"summary":"Animation export godot","operationId":"animation_export_godot","parameters":[{"name":"id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportRangeRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GodotExport"}}}},"429":{"description":"Rate limit exceeded"}}}},"/animation-runs/{id}/export/godot.zip":{"post":{"tags":["Animations"],"summary":"Animation export godot zip","operationId":"animation_export_godot_zip","parameters":[{"name":"id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportRangeRequest"}}},"required":true},"responses":{"200":{"description":"Binary content"},"429":{"description":"Rate limit exceeded"}}}},"/animation-runs/{id}/export/grid":{"post":{"tags":["Animations"],"summary":"Animation export grid strip","operationId":"animation_export_grid_strip","parameters":[{"name":"id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportRangeRequest"}}},"required":true},"responses":{"200":{"description":"Binary content"},"429":{"description":"Rate limit exceeded"}}}},"/animation-runs/{id}/export/sequence.zip":{"post":{"tags":["Animations"],"summary":"Animation export sequence zip","operationId":"animation_export_sequence_zip","parameters":[{"name":"id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportRangeRequest"}}},"required":true},"responses":{"200":{"description":"Binary content"},"429":{"description":"Rate limit exceeded"}}}},"/animation-runs/{id}/export/texturepacker":{"post":{"tags":["Animations"],"summary":"Animation export texturepacker","operationId":"animation_export_texturepacker","parameters":[{"name":"id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportRangeRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TexturePackerExport"}}}},"429":{"description":"Rate limit exceeded"}}}},"/animation-runs/{id}/export/texturepacker.zip":{"post":{"tags":["Animations"],"summary":"Animation export texturepacker zip","operationId":"animation_export_texturepacker_zip","parameters":[{"name":"id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportRangeRequest"}}},"required":true},"responses":{"200":{"description":"Binary content"},"429":{"description":"Rate limit exceeded"}}}},"/animation-runs/{id}/frames/{number}/content":{"get":{"tags":["Animations"],"summary":"Animation frame content by number","operationId":"animation_frame_content","parameters":[{"name":"id","in":"path","description":"Animation run id","required":true,"schema":{"type":"string"}},{"name":"number","in":"path","description":"1-based frame number","required":true,"schema":{"type":"integer","format":"int32","minimum":0}}],"responses":{"200":{"description":"Binary content"},"429":{"description":"Rate limit exceeded"}}}},"/animation-runs/{id}/unarchive":{"post":{"tags":["Animations"],"summary":"Unarchive animation","operationId":"unarchive_animation","parameters":[{"name":"id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArchiveResponse"}}}},"429":{"description":"Rate limit exceeded"}}}},"/art-styles/{art_style_id}":{"delete":{"tags":["Art styles"],"summary":"Delete art style","operationId":"delete_art_style","parameters":[{"name":"art_style_id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}}}}},"/assets/{asset_id}/label-suggestions":{"delete":{"tags":["Labels"],"summary":"Dismiss label suggestion","operationId":"dismiss_label_suggestion","parameters":[{"name":"asset_id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}},{"name":"name","in":"query","description":"Query parameter","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}}}}},"/assets/{asset_id}/labels":{"post":{"tags":["Labels"],"summary":"Associate label","operationId":"associate_label","parameters":[{"name":"asset_id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssociateLabelRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabelAssociation"}}}}}},"delete":{"tags":["Labels"],"summary":"Remove label","operationId":"remove_label","parameters":[{"name":"asset_id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}},{"name":"name","in":"query","description":"Query parameter","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabelAssociation"}}}}}}},"/assets/{id}":{"get":{"tags":["Sprites"],"summary":"Get asset","operationId":"get_asset","parameters":[{"name":"id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpriteAsset"}}}},"429":{"description":"Rate limit exceeded"}}},"delete":{"tags":["Sprites"],"summary":"Delete asset","operationId":"delete_asset","parameters":[{"name":"id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Deleted"}}},"patch":{"tags":["Sprites"],"summary":"Update asset","operationId":"update_asset","parameters":[{"name":"id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAssetRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetNameResponse"}}}}}}},"/assets/{id}/archive":{"post":{"tags":["Sprites"],"summary":"Archive asset","operationId":"archive_asset","parameters":[{"name":"id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArchiveResponse"}}}},"429":{"description":"Rate limit exceeded"}}}},"/assets/{id}/content":{"get":{"tags":["Sprites"],"summary":"Asset","operationId":"asset","parameters":[{"name":"id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Binary content"},"429":{"description":"Rate limit exceeded"}}}},"/assets/{id}/metadata":{"put":{"tags":["Sprites"],"summary":"Put asset metadata","operationId":"put_asset_metadata","parameters":[{"name":"id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutMetadataRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetMetadataResponse"}}}},"429":{"description":"Rate limit exceeded"}}}},"/assets/{id}/original":{"get":{"tags":["Sprites"],"summary":"Asset original","operationId":"asset_original","parameters":[{"name":"id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Binary content"},"429":{"description":"Rate limit exceeded"}}}},"/assets/{id}/unarchive":{"post":{"tags":["Sprites"],"summary":"Unarchive asset","operationId":"unarchive_asset","parameters":[{"name":"id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArchiveResponse"}}}},"429":{"description":"Rate limit exceeded"}}}},"/generations/{id}":{"get":{"tags":["Sprites"],"summary":"Get generation","operationId":"get_generation","parameters":[{"name":"id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}},{"name":"include_archived","in":"query","description":"Query parameter","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpriteGeneration"}}}},"429":{"description":"Rate limit exceeded"}}},"delete":{"tags":["Sprites"],"summary":"Delete generation","operationId":"delete_generation","parameters":[{"name":"id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Deleted"}}}},"/generations/{id}/archive":{"post":{"tags":["Sprites"],"summary":"Archive generation","operationId":"archive_generation","parameters":[{"name":"id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArchiveResponse"}}}},"429":{"description":"Rate limit exceeded"}}}},"/generations/{id}/unarchive":{"post":{"tags":["Sprites"],"summary":"Unarchive generation","operationId":"unarchive_generation","parameters":[{"name":"id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArchiveResponse"}}}},"429":{"description":"Rate limit exceeded"}}}},"/health":{"get":{"tags":["System"],"summary":"Health","operationId":"health","responses":{"200":{"description":"Success"}}}},"/keys":{"get":{"tags":["API keys"],"summary":"List keys","operationId":"list_keys","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyList"}}}}}},"post":{"tags":["API keys"],"summary":"Create key","operationId":"create_key","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyResponse"}}}},"429":{"description":"Rate limit exceeded"}}}},"/keys/{id}":{"delete":{"tags":["API keys"],"summary":"Delete key","operationId":"delete_key","parameters":[{"name":"id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}}}},"patch":{"tags":["API keys"],"summary":"Update key","operationId":"update_key","parameters":[{"name":"id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateKeyRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyResponse"}}}}}}},"/labels/{label_id}":{"delete":{"tags":["Labels"],"summary":"Delete label","operationId":"delete_label","parameters":[{"name":"label_id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}}}},"patch":{"tags":["Labels"],"summary":"Update label","operationId":"update_label","parameters":[{"name":"label_id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateLabelRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabelRow"}}}}}}},"/labels/{label_id}/items":{"get":{"tags":["Labels"],"summary":"Label items","operationId":"label_items","parameters":[{"name":"label_id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabelItems"}}}},"429":{"description":"Rate limit exceeded"}}}},"/labels/{label_id}/thumbnail":{"post":{"tags":["Labels"],"summary":"Set label thumbnail","operationId":"set_label_thumbnail","parameters":[{"name":"label_id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetThumbnailRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabelRow"}}}}}}},"/projects":{"get":{"tags":["Projects"],"summary":"List projects","operationId":"list_projects","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectList"}}}}}},"post":{"tags":["Projects"],"summary":"Create project","operationId":"create_project","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProjectRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectRow"}}}},"429":{"description":"Rate limit exceeded"}}}},"/projects/{project_id}/animation-runs":{"get":{"tags":["Animations"],"summary":"List animations","operationId":"list_animations","parameters":[{"name":"project_id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}},{"name":"before","in":"query","description":"Query parameter","required":false,"schema":{"type":"string"}},{"name":"include_archived","in":"query","description":"Query parameter","required":false,"schema":{"type":"boolean"}},{"name":"base_asset_id","in":"query","description":"Only return animation runs whose base image is this sprite asset id","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnimationList"}}}}}},"post":{"tags":["Animations"],"summary":"Create animation","operationId":"create_animation","parameters":[{"name":"project_id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAnimationRunRequest"}}},"required":true},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Reservation"}}}},"429":{"description":"Rate limit exceeded"}}}},"/projects/{project_id}/animation-runs/estimate":{"post":{"tags":["Animations"],"summary":"Estimate animation","operationId":"estimate_animation","parameters":[{"name":"project_id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EstimateAnimationRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnimationEstimate"}}}}}}},"/projects/{project_id}/animation-runs/{id}/frames":{"post":{"tags":["Animations"],"summary":"Generate animation frames","operationId":"create_animation_frames","parameters":[{"name":"project_id","in":"path","description":"Project id","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"Animation run id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateFramesRequest"}}},"required":true},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Reservation"}}}},"429":{"description":"Rate limit exceeded"}}}},"/projects/{project_id}/art-styles":{"get":{"tags":["Art styles"],"summary":"List art styles","operationId":"list_art_styles","parameters":[{"name":"project_id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtStyleList"}}}}}},"post":{"tags":["Art styles"],"summary":"Create art style","operationId":"create_art_style","parameters":[{"name":"project_id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateArtStyleRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtStyleRow"}}}},"429":{"description":"Rate limit exceeded"}}}},"/projects/{project_id}/art-styles/generate":{"post":{"tags":["Art styles"],"summary":"Generate art style","operationId":"generate_art_style","parameters":[{"name":"project_id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtStyleSuggestion"}}}}}}},"/projects/{project_id}/generations":{"get":{"tags":["Sprites"],"summary":"List","operationId":"list","parameters":[{"name":"project_id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}},{"name":"before","in":"query","description":"Query parameter","required":false,"schema":{"type":"string"}},{"name":"include_archived","in":"query","description":"Query parameter","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerationList"}}}}}},"post":{"tags":["Sprites"],"summary":"Create","operationId":"create","parameters":[{"name":"project_id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRequest"}}},"required":true},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Reservation"}}}},"429":{"description":"Rate limit exceeded"}}}},"/projects/{project_id}/labels":{"get":{"tags":["Labels"],"summary":"List labels","operationId":"list_labels","parameters":[{"name":"project_id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabelList"}}}}}},"post":{"tags":["Labels"],"summary":"Create label","description":"Creates a label in the project. A project may have at most 10,000 labels; exceeding that returns 400. The limit is also enforced by a database trigger.","operationId":"create_label","parameters":[{"name":"project_id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLabelRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabelRow"}}}},"429":{"description":"Rate limit exceeded"}}}},"/projects/{project_id}/saved-animations":{"get":{"tags":["Animations"],"summary":"List saved animations","operationId":"list_saved_animations","parameters":[{"name":"project_id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}},{"name":"before","in":"query","description":"Query parameter","required":false,"schema":{"type":"string"}},{"name":"include_archived","in":"query","description":"Query parameter","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedAnimationList"}}}}}},"post":{"tags":["Animations"],"summary":"Create saved animation","operationId":"create_saved_animation","parameters":[{"name":"project_id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSavedAnimationRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedAnimation"}}}},"429":{"description":"Rate limit exceeded"}}}},"/projects/{project_id}/sound-generations":{"get":{"tags":["Sounds"],"summary":"List sounds","operationId":"list_sounds","parameters":[{"name":"project_id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}},{"name":"before","in":"query","description":"Query parameter","required":false,"schema":{"type":"string"}},{"name":"include_archived","in":"query","description":"Query parameter","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SoundGenerationList"}}}}}},"post":{"tags":["Sounds"],"summary":"Create sound","operationId":"create_sound","parameters":[{"name":"project_id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSoundRequest"}}},"required":true},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Reservation"}}}},"429":{"description":"Rate limit exceeded"}}}},"/projects/{project_id}/sprite-assets":{"get":{"tags":["Sprites"],"summary":"List sprite assets","operationId":"list_sprite_assets","parameters":[{"name":"project_id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}},{"name":"q","in":"query","description":"Query parameter","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetList"}}}},"429":{"description":"Rate limit exceeded"}}}},"/projects/{slug}":{"delete":{"tags":["Projects"],"summary":"Delete project","description":"Deletes the project and its created content (stored sprites, sounds and animations, labels, art styles, saved animations and suggestions). The project is removed from listings and project-scoped access, and the name (slug) can be reused. Only anonymized generation metadata (which models ran, when and at what cost), credit/debit usage records and billing records are retained for audit.","operationId":"delete_project","parameters":[{"name":"slug","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}}}},"patch":{"tags":["Projects"],"summary":"Rename project","operationId":"rename_project","parameters":[{"name":"slug","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenameProjectRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectRow"}}}}}}},"/saved-animations/{id}":{"get":{"tags":["Animations"],"summary":"Get saved animation","operationId":"get_saved_animation","parameters":[{"name":"id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedAnimation"}}}},"429":{"description":"Rate limit exceeded"}}},"delete":{"tags":["Animations"],"summary":"Delete saved animation","operationId":"delete_saved_animation","parameters":[{"name":"id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Deleted"}}},"patch":{"tags":["Animations"],"summary":"Update saved animation","operationId":"update_saved_animation","parameters":[{"name":"id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSavedAnimationRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetNameResponse"}}}}}}},"/saved-animations/{id}/archive":{"post":{"tags":["Animations"],"summary":"Archive saved animation","operationId":"archive_saved_animation","parameters":[{"name":"id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArchiveResponse"}}}},"429":{"description":"Rate limit exceeded"}}}},"/saved-animations/{id}/labels":{"post":{"tags":["Labels"],"summary":"Associate saved animation label","operationId":"associate_saved_animation_label","parameters":[{"name":"id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssociateLabelRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabelAssociation"}}}}}},"delete":{"tags":["Labels"],"summary":"Remove saved animation label","operationId":"remove_saved_animation_label","parameters":[{"name":"id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}},{"name":"name","in":"query","description":"Query parameter","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabelAssociation"}}}}}}},"/saved-animations/{id}/metadata":{"put":{"tags":["Animations"],"summary":"Put saved animation metadata","operationId":"put_saved_animation_metadata","parameters":[{"name":"id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutSavedAnimationMetadataRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetMetadataResponse"}}}},"429":{"description":"Rate limit exceeded"}}}},"/saved-animations/{id}/unarchive":{"post":{"tags":["Animations"],"summary":"Unarchive saved animation","operationId":"unarchive_saved_animation","parameters":[{"name":"id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArchiveResponse"}}}},"429":{"description":"Rate limit exceeded"}}}},"/sound-assets/{asset_id}/label-suggestions":{"delete":{"tags":["Labels"],"summary":"Dismiss sound suggestion","operationId":"dismiss_sound_suggestion","parameters":[{"name":"asset_id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}},{"name":"name","in":"query","description":"Query parameter","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}}}}},"/sound-assets/{asset_id}/labels":{"post":{"tags":["Labels"],"summary":"Associate sound label","operationId":"associate_sound_label","parameters":[{"name":"asset_id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssociateLabelRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabelAssociation"}}}}}},"delete":{"tags":["Labels"],"summary":"Remove sound label","operationId":"remove_sound_label","parameters":[{"name":"asset_id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}},{"name":"name","in":"query","description":"Query parameter","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabelAssociation"}}}}}}},"/sound-assets/{id}":{"delete":{"tags":["Sounds"],"summary":"Delete sound asset","operationId":"delete_sound_asset","parameters":[{"name":"id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Deleted"}}},"patch":{"tags":["Sounds"],"summary":"Update sound asset","operationId":"update_sound_asset","parameters":[{"name":"id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSoundRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetNameResponse"}}}}}}},"/sound-assets/{id}/archive":{"post":{"tags":["Sounds"],"summary":"Archive sound asset","operationId":"archive_sound_asset","parameters":[{"name":"id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArchiveResponse"}}}},"429":{"description":"Rate limit exceeded"}}}},"/sound-assets/{id}/content":{"get":{"tags":["Sounds"],"summary":"Sound asset","operationId":"sound_asset","parameters":[{"name":"id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Binary content"},"429":{"description":"Rate limit exceeded"}}}},"/sound-assets/{id}/metadata":{"put":{"tags":["Sounds"],"summary":"Put sound metadata","operationId":"put_sound_metadata","parameters":[{"name":"id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutSoundMetadataRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetMetadataResponse"}}}},"429":{"description":"Rate limit exceeded"}}}},"/sound-assets/{id}/unarchive":{"post":{"tags":["Sounds"],"summary":"Unarchive sound asset","operationId":"unarchive_sound_asset","parameters":[{"name":"id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArchiveResponse"}}}},"429":{"description":"Rate limit exceeded"}}}},"/sound-generations/{id}":{"get":{"tags":["Sounds"],"summary":"Get sound","operationId":"get_sound","parameters":[{"name":"id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}},{"name":"include_archived","in":"query","description":"Query parameter","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SoundGeneration"}}}},"429":{"description":"Rate limit exceeded"}}}},"/sound-generations/{id}/archive":{"post":{"tags":["Sounds"],"summary":"Archive sound generation","operationId":"archive_sound_generation","parameters":[{"name":"id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArchiveResponse"}}}},"429":{"description":"Rate limit exceeded"}}}},"/sound-generations/{id}/unarchive":{"post":{"tags":["Sounds"],"summary":"Unarchive sound generation","operationId":"unarchive_sound_generation","parameters":[{"name":"id","in":"path","description":"Path parameter","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArchiveResponse"}}}},"429":{"description":"Rate limit exceeded"}}}},"/sound-models":{"get":{"tags":["Catalog"],"summary":"Sound models","operationId":"sound_models","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SoundCatalog"}}}}}}},"/sprite-models":{"get":{"tags":["Catalog"],"summary":"Models","operationId":"models","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpriteCatalog"}}}}}}},"/usage":{"get":{"tags":["Usage"],"summary":"Usage","operationId":"usage","parameters":[{"name":"before","in":"query","description":"Query parameter","required":false,"schema":{"type":"string"}},{"name":"split","in":"query","description":"Query parameter","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageResponse"}}}},"429":{"description":"Rate limit exceeded"}}}},"/usage/histogram":{"get":{"tags":["Usage"],"summary":"Usage histogram","operationId":"usage_histogram","parameters":[{"name":"range","in":"query","description":"Query parameter","required":false,"schema":{"type":"string"}},{"name":"source","in":"query","description":"Query parameter","required":false,"schema":{"type":"string"}},{"name":"split","in":"query","description":"Query parameter","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageHistogram"}}}},"429":{"description":"Rate limit exceeded"}}}},"/users/me":{"post":{"tags":["API keys"],"summary":"Ensure user","operationId":"ensure_user","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}}}}}},"components":{"schemas":{"AnimationAsset":{"type":"object","required":["id","duration_seconds","resolution","created_at"],"properties":{"id":{"type":"string","format":"uuid"},"duration_seconds":{"type":"integer","format":"int64"},"resolution":{"type":"string"},"created_at":{"type":"string","format":"date-time"}}},"AnimationCatalog":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AnimationModelInfo"}}}},"AnimationEstimate":{"type":"object","required":["animation_model","duration","resolution","credits","usd","reserved_credits"],"properties":{"animation_model":{"type":"string"},"duration":{"type":"integer","format":"int64"},"resolution":{"type":"string"},"credits":{"type":"string"},"usd":{"type":"string"},"reserved_credits":{"type":"string"}}},"AnimationFrame":{"type":"object","required":["id","frame_number","generation_id","created_at"],"properties":{"id":{"type":"string","format":"uuid"},"frame_number":{"type":"integer","format":"int32"},"generation_id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"}}},"AnimationFrameRun":{"type":"object","required":["id","status","fps","frame_count","credits_consumed","reserved_credits","created_at","warming"],"properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string"},"fps":{"type":"integer","format":"int64"},"frame_count":{"type":"integer","format":"int64"},"credits_consumed":{"type":"string"},"reserved_credits":{"type":"string"},"error":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"warming":{"type":"boolean","description":"True once this frame run hit a cold start on an internal self-hosted model."}}},"AnimationGeneration":{"type":"object","required":["id","project_id","status","created_at","credits_consumed","reserved_credits","assets_delivered","frames","frame_runs","user_id","source","prompt","animation_model"],"properties":{"id":{"type":"string","format":"uuid"},"project_id":{"type":"string","format":"uuid"},"status":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"},"error":{"type":["string","null"]},"credits_consumed":{"type":"string"},"reserved_credits":{"type":"string"},"archived_at":{"type":["string","null"],"format":"date-time"},"assets_delivered":{"type":"boolean"},"animation":{"oneOf":[{"$ref":"#/components/schemas/AnimationAsset"},{"type":"null"}]},"frames":{"type":"array","items":{"$ref":"#/components/schemas/AnimationFrame"}},"frame_runs":{"type":"array","items":{"$ref":"#/components/schemas/AnimationFrameRun"}},"user_id":{"type":"string","description":"Clerk user id (or API-key owner) who ran the animation."},"source":{"type":"string","description":"`UI` or `API key`."},"api_key_id":{"type":["string","null"],"format":"uuid"},"key_name":{"type":["string","null"]},"prompt":{"type":"string"},"animation_model":{"type":"string"},"duration":{"type":["integer","null"],"format":"int64"},"base_asset_id":{"type":["string","null"],"format":"uuid"}}},"AnimationList":{"type":"object","required":["animations","total"],"properties":{"animations":{"type":"array","items":{"$ref":"#/components/schemas/AnimationGeneration"}},"next_cursor":{"type":["string","null"],"format":"uuid"},"total":{"type":"integer","format":"int64"}}},"AnimationModelInfo":{"type":"object","required":["id","name","description","supported_durations","supported_resolutions"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"supported_durations":{"type":"array","items":{"type":"integer","format":"int64"}},"supported_resolutions":{"type":"array","items":{"type":"string"}}}},"ApiKeyResponse":{"type":"object","required":["id","key_prefix","spend_reset_cadence","key_scope","spend","lifetime_spend","created_at"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":["string","null"]},"key_prefix":{"type":"string"},"expires_at":{"type":["string","null"],"format":"date-time"},"max_spend_limit":{"type":["string","null"]},"spend_reset_cadence":{"type":"string"},"key_scope":{"type":"string","description":"`admin`, `project_write`, or `project_read`."},"project_id":{"type":["string","null"],"format":"uuid","description":"The bound project for a project-scoped key; `null` for admin keys."},"spend":{"type":"string","description":"Spend in the current cycle (resets per cadence)."},"lifetime_spend":{"type":"string","description":"All-time spend, never reset."},"spend_reset_at":{"type":["string","null"],"format":"date-time","description":"When the current cycle ends and `spend` resets to 0. Null for `never`."},"created_at":{"type":"string","format":"date-time"}}},"ApiKeyScope":{"type":"string","description":"What an API key is allowed to do.\n\n- `Admin`: the historical key type. Full access to the owning account/org,\n  exactly like an admin session (subject to the same route guards).\n- `ProjectWrite`: bound to one project; can read its project's content and\n  write to it (generate sprites/sounds/animations, manage labels, names,\n  metadata and archives) but cannot touch account/admin surfaces or any\n  other project.\n- `ProjectRead`: bound to one project; read-only. Cannot mutate anything.","enum":["admin","project_write","project_read"]},"ArchiveResponse":{"type":"object","required":["ok"],"properties":{"ok":{"type":"boolean"},"archived_at":{"type":["string","null"],"format":"date-time"}}},"ArtStyleList":{"type":"object","required":["art_styles"],"properties":{"art_styles":{"type":"array","items":{"$ref":"#/components/schemas/ArtStyleRow"}}}},"ArtStyleRow":{"type":"object","required":["id","name","created_at"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"created_at":{"type":"string","format":"date-time"}}},"ArtStyleSuggestion":{"type":"object","description":"One invented art-style candidate.","required":["name"],"properties":{"name":{"type":"string"}}},"AssetList":{"type":"object","required":["assets"],"properties":{"assets":{"type":"array","items":{"$ref":"#/components/schemas/SpriteAsset"}}}},"AssetMetadataResponse":{"type":"object","required":["ok","metadata"],"properties":{"ok":{"type":"boolean"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"propertyNames":{"type":"string"}}}},"AssetNameResponse":{"type":"object","required":["ok"],"properties":{"ok":{"type":"boolean"},"name":{"type":["string","null"]}}},"AssociateLabelRequest":{"type":"object","description":"Deterministic color assignment: pick from a curated palette by name hash\nso every label gets a different color without client-side state.","required":["name"],"properties":{"name":{"type":"string"}}},"CreateAnimationRunRequest":{"type":"object","required":["request_id","prompt","animation_model"],"properties":{"request_id":{"type":"string","format":"uuid"},"prompt":{"type":"string"},"animation_model":{"type":"string"},"duration":{"type":["integer","null"],"format":"int64"},"base_asset_id":{"type":["string","null"],"format":"uuid"}},"additionalProperties":false},"CreateApiKeyRequest":{"type":"object","properties":{"name":{"type":["string","null"]},"expires_at":{"type":["string","null"],"format":"date-time"},"max_spend_limit":{"type":["string","null"]},"spend_reset_cadence":{"type":["string","null"]},"key_scope":{"oneOf":[{"$ref":"#/components/schemas/ApiKeyScope","description":"`admin` (default), `project_write`, or `project_read`."},{"type":"null"}]},"project_id":{"type":["string","null"],"format":"uuid","description":"Required for the project scopes; must be `null` for `admin`."}}},"CreateApiKeyResponse":{"allOf":[{"$ref":"#/components/schemas/ApiKeyResponse"},{"type":"object","required":["key_full"],"properties":{"key_full":{"type":"string","description":"Full key, returned exactly once at creation time."}}}]},"CreateArtStyleRequest":{"type":"object","required":["name"],"properties":{"name":{"type":"string"}}},"CreateLabelRequest":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"color":{"type":["string","null"]}}},"CreateProjectRequest":{"type":"object","required":["name"],"properties":{"name":{"type":"string"}}},"CreateRequest":{"type":"object","required":["request_id","prompt","mode","image_model"],"properties":{"request_id":{"type":"string","format":"uuid"},"prompt":{"type":"string"},"mode":{"type":"string"},"image_model":{"type":"string"},"text_model":{"type":["string","null"]},"quality":{"type":["string","null"]},"resolution":{"type":["string","null"]},"base_asset_id":{"type":["string","null"],"format":"uuid","description":"Present when editing an existing individual image result."}},"additionalProperties":false},"CreateSavedAnimationRequest":{"type":"object","required":["generation_id","start_frame","end_frame"],"properties":{"generation_id":{"type":"string","format":"uuid"},"start_frame":{"type":"integer","format":"int64"},"end_frame":{"type":"integer","format":"int64"},"name":{"type":["string","null"]}},"additionalProperties":false},"CreateSoundRequest":{"type":"object","required":["request_id","prompt","sound_model"],"properties":{"request_id":{"type":"string","format":"uuid"},"prompt":{"type":"string"},"sound_model":{"type":"string"},"response_format":{"type":["string","null"]}},"additionalProperties":false},"EstimateAnimationRequest":{"type":"object","required":["animation_model"],"properties":{"animation_model":{"type":"string"},"duration":{"type":["integer","null"],"format":"int64"},"base_asset_id":{"type":["string","null"],"format":"uuid"}},"additionalProperties":false},"ExportFirstFrame":{"type":"object","required":["frame_number","image_width","image_height"],"properties":{"frame_number":{"type":"integer","format":"int32"},"image_width":{"type":"integer","format":"int32","minimum":0},"image_height":{"type":"integer","format":"int32","minimum":0},"bounds":{"type":["array","null"],"items":{"type":"integer","format":"int32","minimum":0}}}},"ExportFrame":{"type":"object","required":["frame_number","image_width","image_height","scaled_width","scaled_height","offset_x","offset_y"],"properties":{"frame_number":{"type":"integer","format":"int32"},"image_width":{"type":"integer","format":"int32","minimum":0},"image_height":{"type":"integer","format":"int32","minimum":0},"bounds":{"type":["array","null"],"items":{"type":"integer","format":"int32","minimum":0}},"scaled_width":{"type":"integer","format":"int32","minimum":0},"scaled_height":{"type":"integer","format":"int32","minimum":0},"offset_x":{"type":"integer","format":"int32","minimum":0},"offset_y":{"type":"integer","format":"int32","minimum":0}}},"ExportPlan":{"type":"object","required":["start_frame","end_frame","max_width","max_height","scale","scale_width","scale_height","canvas_width","canvas_height","frame_count","frames"],"properties":{"start_frame":{"type":"integer","format":"int32"},"end_frame":{"type":"integer","format":"int32"},"reference":{"oneOf":[{"$ref":"#/components/schemas/ExportReference"},{"type":"null"}]},"first_frame":{"oneOf":[{"$ref":"#/components/schemas/ExportFirstFrame"},{"type":"null"}]},"max_width":{"type":"integer","format":"int32","minimum":0},"max_height":{"type":"integer","format":"int32","minimum":0},"scale":{"type":"number","format":"double"},"scale_width":{"type":"number","format":"double"},"scale_height":{"type":"number","format":"double"},"canvas_width":{"type":"integer","format":"int32","minimum":0},"canvas_height":{"type":"integer","format":"int32","minimum":0},"frame_count":{"type":"integer","format":"int64"},"frames":{"type":"array","items":{"$ref":"#/components/schemas/ExportFrame"}}}},"ExportRangeRequest":{"type":"object","description":"The selected frame range for an export.","required":["start_frame","end_frame"],"properties":{"start_frame":{"type":"integer","format":"int32"},"end_frame":{"type":"integer","format":"int32"}},"additionalProperties":false},"ExportReference":{"type":"object","required":["bounds","image_width","image_height"],"properties":{"bounds":{"type":"array","items":{"type":"integer","format":"int32","minimum":0}},"image_width":{"type":"integer","format":"int32","minimum":0},"image_height":{"type":"integer","format":"int32","minimum":0}}},"GenerateFramesRequest":{"type":"object","required":["request_id","fps"],"properties":{"request_id":{"type":"string","format":"uuid"},"fps":{"type":"integer","format":"int64"}},"additionalProperties":false},"GenerationList":{"type":"object","required":["generations","total"],"properties":{"generations":{"type":"array","items":{"$ref":"#/components/schemas/SpriteGeneration"}},"next_cursor":{"type":["string","null"],"format":"uuid"},"total":{"type":"integer","format":"int64"}}},"GodotExport":{"type":"object","required":["plan","tres","image_base64","image_filename","tres_filename"],"properties":{"plan":{"$ref":"#/components/schemas/ExportPlan"},"tres":{"type":"string"},"image_base64":{"type":"string"},"image_filename":{"type":"string"},"tres_filename":{"type":"string"}}},"ImageModelInfo":{"type":"object","required":["id","name","blurb","available","qualities","resolutions","native_transparency","editing","transparency_status","default_canvas_size","capabilities_url"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"blurb":{"type":"string"},"available":{"type":"boolean"},"unavailable_reason":{"type":["string","null"]},"qualities":{"type":"array","items":{"type":"string"}},"resolutions":{"type":"array","items":{"type":"string"}},"native_transparency":{"type":"boolean"},"editing":{"type":"boolean"},"transparency_status":{"type":"string"},"default_quality":{"type":["string","null"]},"default_resolution":{"type":["string","null"]},"default_canvas_size":{"type":"string"},"capabilities_url":{"type":"string"},"reservation_credits":{"type":["string","null"]}}},"KeyList":{"type":"object","description":"Response for listing keys.","required":["keys"],"properties":{"keys":{"type":"array","items":{"$ref":"#/components/schemas/ApiKeyResponse"}}}},"LabelAsset":{"type":"object","required":["id","width","height"],"properties":{"id":{"type":"string","format":"uuid"},"width":{"type":"integer","format":"int32"},"height":{"type":"integer","format":"int32"},"archived_at":{"type":["string","null"],"format":"date-time"},"name":{"type":["string","null"]},"has_original":{"type":"boolean"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"propertyNames":{"type":"string"}},"generation_id":{"type":["string","null"],"format":"uuid"},"prompt":{"type":["string","null"]},"created_at":{"type":["string","null"],"format":"date-time"},"labels":{"type":"array","items":{"type":"string"}},"user_id":{"type":["string","null"],"description":"Clerk user id (or API-key owner) who generated this item."},"source":{"type":["string","null"],"description":"`UI` or `API key`."},"api_key_id":{"type":["string","null"],"format":"uuid"},"key_name":{"type":["string","null"]}}},"LabelAssociation":{"type":"object","description":"A mutation's resulting label-name set for one item.","required":["ok","labels"],"properties":{"ok":{"type":"boolean"},"labels":{"type":"array","items":{"type":"string"}}}},"LabelItems":{"type":"object","description":"Everything tagged with one label: sprite results, sounds and saved animations.","required":["label","assets","sounds","saved_animations"],"properties":{"label":{"$ref":"#/components/schemas/LabelRow"},"assets":{"type":"array","items":{"$ref":"#/components/schemas/LabelAsset"}},"sounds":{"type":"array","items":{"$ref":"#/components/schemas/LabelSound"}},"saved_animations":{"type":"array","items":{"$ref":"#/components/schemas/LabelSavedAnimation"}}}},"LabelList":{"type":"object","required":["labels"],"properties":{"labels":{"type":"array","items":{"$ref":"#/components/schemas/LabelRow"}}}},"LabelRow":{"type":"object","required":["id","name","color","created_at"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"color":{"type":"string"},"thumbnail_asset_id":{"type":["string","null"],"format":"uuid"},"created_at":{"type":"string","format":"date-time"}}},"LabelSavedAnimation":{"type":"object","required":["id","project_id","generation_id","start_frame","end_frame"],"properties":{"id":{"type":"string","format":"uuid"},"project_id":{"type":"string","format":"uuid"},"generation_id":{"type":"string","format":"uuid"},"start_frame":{"type":"integer","format":"int64"},"end_frame":{"type":"integer","format":"int64"},"archived_at":{"type":["string","null"],"format":"date-time"},"name":{"type":["string","null"]},"animation_model":{"type":["string","null"]},"prompt":{"type":["string","null"]},"base_asset_id":{"type":["string","null"],"format":"uuid"},"created_at":{"type":["string","null"],"format":"date-time"},"frame_count":{"type":"integer","format":"int64"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"propertyNames":{"type":"string"}},"labels":{"type":"array","items":{"type":"string"}},"user_id":{"type":["string","null"],"description":"Clerk user id (or API-key owner) who generated this item."},"source":{"type":["string","null"],"description":"`UI` or `API key`."},"api_key_id":{"type":["string","null"],"format":"uuid"},"key_name":{"type":["string","null"]}}},"LabelSound":{"type":"object","required":["id","format"],"properties":{"id":{"type":"string","format":"uuid"},"format":{"type":"string"},"archived_at":{"type":["string","null"],"format":"date-time"},"name":{"type":["string","null"]},"metadata":{"type":"object","additionalProperties":{"type":"string"},"propertyNames":{"type":"string"}},"generation_id":{"type":["string","null"],"format":"uuid"},"prompt":{"type":["string","null"]},"created_at":{"type":["string","null"],"format":"date-time"},"labels":{"type":"array","items":{"type":"string"}},"user_id":{"type":["string","null"],"description":"Clerk user id (or API-key owner) who generated this item."},"source":{"type":["string","null"],"description":"`UI` or `API key`."},"api_key_id":{"type":["string","null"],"format":"uuid"},"key_name":{"type":["string","null"]}}},"MultipleLayout":{"type":"object","required":["rows","columns","images_per_request"],"properties":{"rows":{"type":"integer","format":"int32","minimum":0},"columns":{"type":"integer","format":"int32","minimum":0},"images_per_request":{"type":"integer","format":"int32","minimum":0}}},"OkResponse":{"type":"object","description":"Generic `{ \"ok\": true }` acknowledgement for mutations with no body.","required":["ok"],"properties":{"ok":{"type":"boolean"}}},"ProjectList":{"type":"object","required":["projects"],"properties":{"projects":{"type":"array","items":{"$ref":"#/components/schemas/ProjectRow"}}}},"ProjectRow":{"type":"object","required":["id","name","slug","created_at"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"slug":{"type":"string"},"created_at":{"type":"string","format":"date-time"}}},"PutMetadataRequest":{"type":"object","properties":{"metadata":{"type":"object","additionalProperties":{"type":"string"},"propertyNames":{"type":"string"}}}},"PutSavedAnimationMetadataRequest":{"type":"object","properties":{"metadata":{"type":"object","additionalProperties":{"type":"string"},"propertyNames":{"type":"string"}}}},"PutSoundMetadataRequest":{"type":"object","properties":{"metadata":{"type":"object","additionalProperties":{"type":"string"},"propertyNames":{"type":"string"}}}},"RenameProjectRequest":{"type":"object","required":["name"],"properties":{"name":{"type":"string"}}},"Reservation":{"type":"object","description":"The reservation returned when a generation is accepted (also the idempotent\nreplay shape for an existing `request_id`).","required":["id","status","created","reserved_credits"],"properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string"},"created":{"type":"boolean"},"reserved_credits":{"type":"string","description":"Decimal credits, serialized as a string."}}},"SavedAnimation":{"type":"object","required":["id","project_id","generation_id","start_frame","end_frame","created_at","frame_count","metadata","labels"],"properties":{"id":{"type":"string","format":"uuid"},"project_id":{"type":"string","format":"uuid"},"generation_id":{"type":"string","format":"uuid"},"start_frame":{"type":"integer","format":"int64"},"end_frame":{"type":"integer","format":"int64"},"name":{"type":["string","null"]},"archived_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"animation_model":{"type":["string","null"]},"prompt":{"type":["string","null"]},"base_asset_id":{"type":["string","null"],"format":"uuid"},"frame_count":{"type":"integer","format":"int64"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"propertyNames":{"type":"string"}},"labels":{"type":"array","items":{"type":"string"}}}},"SavedAnimationList":{"type":"object","required":["saved_animations","total"],"properties":{"saved_animations":{"type":"array","items":{"$ref":"#/components/schemas/SavedAnimation"}},"next_cursor":{"type":["string","null"],"format":"uuid"},"total":{"type":"integer","format":"int64"}}},"SetThumbnailRequest":{"type":"object","properties":{"asset_id":{"type":["string","null"],"format":"uuid"}}},"SoundAsset":{"type":"object","required":["id","format","created_at"],"properties":{"id":{"type":"string","format":"uuid"},"format":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"archived_at":{"type":["string","null"],"format":"date-time"},"name":{"type":["string","null"]},"metadata":{"type":"object","additionalProperties":{"type":"string"},"propertyNames":{"type":"string"}},"labels":{"type":"array","items":{"type":"string"}},"dismissed_suggestions":{"type":["integer","null"],"format":"int32"},"user_id":{"type":["string","null"],"description":"Clerk user id (or API-key owner) credited for this result."},"source":{"type":["string","null"],"description":"`UI` or `API key`."},"api_key_id":{"type":["string","null"],"format":"uuid"},"key_name":{"type":["string","null"]}}},"SoundCatalog":{"type":"object","required":["model","formats","default_format"],"properties":{"model":{"$ref":"#/components/schemas/SoundModelInfo"},"formats":{"type":"array","items":{"type":"string"}},"default_format":{"type":"string"}}},"SoundGeneration":{"type":"object","required":["id","project_id","status","created_at","credits_consumed","reserved_credits","assets_delivered","archived_assets","assets","user_id","source","prompt","sound_model"],"properties":{"id":{"type":"string","format":"uuid"},"project_id":{"type":"string","format":"uuid"},"status":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"},"error":{"type":["string","null"]},"credits_consumed":{"type":"string"},"reserved_credits":{"type":"string"},"archived_at":{"type":["string","null"],"format":"date-time"},"assets_delivered":{"type":"boolean"},"label_suggestions":{"type":["array","null"],"items":{"type":"string"}},"archived_assets":{"type":"integer","format":"int64"},"assets":{"type":"array","items":{"$ref":"#/components/schemas/SoundAsset"}},"user_id":{"type":"string","description":"Clerk user id (or API-key owner) who ran the generation."},"source":{"type":"string","description":"`UI` or `API key`."},"api_key_id":{"type":["string","null"],"format":"uuid"},"key_name":{"type":["string","null"]},"prompt":{"type":"string"},"sound_model":{"type":"string"},"response_format":{"type":["string","null"]}}},"SoundGenerationList":{"type":"object","required":["sound_generations","total"],"properties":{"sound_generations":{"type":"array","items":{"$ref":"#/components/schemas/SoundGeneration"}},"next_cursor":{"type":["string","null"],"format":"uuid"},"total":{"type":"integer","format":"int64"}}},"SoundModelInfo":{"type":"object","required":["id","name","blurb"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"blurb":{"type":"string"}}},"SpriteAsset":{"type":"object","description":"One delivered sprite result. Some fields are absent depending on the endpoint\n(e.g. the nested assets in a generation omit `generation_id`/`created_at`).","required":["id","width","height"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":["string","null"]},"width":{"type":"integer","format":"int32"},"height":{"type":"integer","format":"int32"},"archived_at":{"type":["string","null"],"format":"date-time"},"generation_id":{"type":["string","null"],"format":"uuid"},"project_id":{"type":["string","null"],"format":"uuid"},"created_at":{"type":["string","null"],"format":"date-time"},"has_original":{"type":"boolean"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"propertyNames":{"type":"string"}},"labels":{"type":"array","items":{"type":"string"}},"dismissed_suggestions":{"type":["integer","null"],"format":"int32"},"prompt":{"type":["string","null"]},"user_id":{"type":["string","null"],"description":"Clerk user id (or API-key owner) credited for this result."},"source":{"type":["string","null"],"description":"`UI` or `API key`."},"api_key_id":{"type":["string","null"],"format":"uuid","description":"The API key used, when the result came through one."},"key_name":{"type":["string","null"]}}},"SpriteCatalog":{"type":"object","required":["verified_at","empirical_evidence","modes","resolution_scope","resolution_note","multiple_layout","image_models","text_models","default_text_model"],"properties":{"verified_at":{"type":"string"},"empirical_evidence":{"type":"string"},"modes":{"type":"array","items":{"type":"string"}},"resolution_scope":{"type":"string"},"resolution_note":{"type":"string"},"multiple_layout":{"$ref":"#/components/schemas/MultipleLayout"},"image_models":{"type":"array","items":{"$ref":"#/components/schemas/ImageModelInfo"}},"text_models":{"type":"array","items":{"$ref":"#/components/schemas/TextModelInfo"}},"default_text_model":{"type":"string"},"reservation_credits":{"type":["string","null"]}}},"SpriteGeneration":{"type":"object","description":"A sprite generation run (`g.request` merged with its derived fields).","required":["id","project_id","status","created_at","credits_consumed","reserved_credits","assets_delivered","archived_assets","assets","warming","user_id","source","prompt","mode","image_model"],"properties":{"id":{"type":"string","format":"uuid"},"project_id":{"type":"string","format":"uuid"},"status":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"},"error":{"type":["string","null"]},"credits_consumed":{"type":"string","description":"Decimal credits, serialized as a string."},"reserved_credits":{"type":"string","description":"Decimal credits, serialized as a string."},"archived_at":{"type":["string","null"],"format":"date-time"},"assets_delivered":{"type":"boolean"},"base_asset_id":{"type":["string","null"],"format":"uuid"},"archived_assets":{"type":"integer","format":"int64"},"art_style_suggestion":{"type":["string","null"]},"label_suggestions":{"type":["array","null"],"items":{"type":"string"}},"assets":{"type":"array","items":{"$ref":"#/components/schemas/SpriteAsset"}},"warming":{"type":"boolean","description":"True once this run hit a cold start on an internal self-hosted model, so\nthe UI can explain the extra latency generically."},"user_id":{"type":"string","description":"Clerk user id (or API-key owner) who ran the generation."},"source":{"type":"string","description":"`UI` or `API key`."},"api_key_id":{"type":["string","null"],"format":"uuid","description":"The API key used, when the run came through one."},"key_name":{"type":["string","null"]},"prompt":{"type":"string"},"mode":{"type":"string"},"image_model":{"type":"string"},"text_model":{"type":["string","null"]},"quality":{"type":["string","null"]},"resolution":{"type":["string","null"]}}},"TextModelInfo":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"}}},"TexturePackerExport":{"type":"object","required":["plan","texturepacker","image_base64","image_filename","json_filename"],"properties":{"plan":{"$ref":"#/components/schemas/ExportPlan"},"texturepacker":{"type":"object","description":"The TexturePacker \"JSON Hash\" document."},"image_base64":{"type":"string"},"image_filename":{"type":"string"},"json_filename":{"type":"string"}}},"UpdateAssetRequest":{"type":"object","properties":{"name":{"type":["string","null"]}}},"UpdateKeyRequest":{"type":"object","properties":{"name":{"type":["string","null"]},"expires_at":{"type":["string","null"],"format":"date-time"},"max_spend_limit":{"type":["string","null"]},"spend_reset_cadence":{"type":["string","null"]}}},"UpdateLabelRequest":{"type":"object","properties":{"name":{"type":["string","null"]},"color":{"type":["string","null"]}}},"UpdateSavedAnimationRequest":{"type":"object","properties":{"name":{"type":["string","null"]}}},"UpdateSoundRequest":{"type":"object","properties":{"name":{"type":["string","null"]}}},"UsageHistogram":{"type":"object","required":["range","width_seconds","sources","buckets"],"properties":{"range":{"type":"string"},"width_seconds":{"type":"integer","format":"int64"},"sources":{"type":"array","items":{"$ref":"#/components/schemas/UsageHistogramSource"}},"buckets":{"type":"array","items":{"$ref":"#/components/schemas/UsageHistogramBucket"}}}},"UsageHistogramBucket":{"type":"object","required":["start","end","total","values"],"properties":{"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"total":{"type":"string"},"values":{"type":"object","additionalProperties":{"type":"string"},"propertyNames":{"type":"string"}}}},"UsageHistogramSource":{"type":"object","required":["id","label","kind"],"properties":{"id":{"type":"string"},"label":{"type":"string"},"kind":{"type":"string"}}},"UsageRecord":{"type":"object","description":"One usage/credit record. Fields vary by generation kind; absent ones are\nomitted by the server.","required":["id","generation_id","created_at","source","operation","credits_consumed"],"properties":{"id":{"type":"string","format":"uuid"},"generation_id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"source":{"type":"string"},"api_key_id":{"type":["string","null"],"format":"uuid"},"user_id":{"type":["string","null"]},"operation":{"type":"string"},"model":{"type":["string","null"]},"credits_consumed":{"type":"string"},"settled":{"type":["boolean","null"]},"generation_status":{"type":["string","null"]},"kind":{"type":["string","null"]},"image_model":{"type":["string","null"]},"animation_model":{"type":["string","null"]},"parent_animation_model":{"type":["string","null"]}}},"UsageResponse":{"type":"object","required":["summary","records","total"],"properties":{"balance_credits":{"type":["string","null"]},"reserved_credits":{"type":["string","null"]},"summary":{"type":"array","items":{"$ref":"#/components/schemas/UsageSummaryEntry"}},"records":{"type":"array","items":{"$ref":"#/components/schemas/UsageRecord"}},"next_cursor":{"type":["string","null"],"format":"uuid"},"total":{"type":"integer","format":"int64"}}},"UsageSummaryEntry":{"type":"object","required":["source","credits_consumed"],"properties":{"source":{"type":"string"},"api_key_id":{"type":["string","null"],"format":"uuid"},"key_name":{"type":["string","null"]},"user_id":{"type":["string","null"]},"credits_consumed":{"type":"string"}}}},"securitySchemes":{"bearer_auth":{"type":"http","scheme":"bearer","bearerFormat":"Clerk session JWT or gt2_ API key"}}},"security":[{"bearer_auth":[]}],"tags":[{"name":"System","description":"Health and status"},{"name":"Catalog","description":"Available models"},{"name":"Projects","description":"Project containers"},{"name":"Sprites","description":"Static sprite generation and assets"},{"name":"Sounds","description":"Sound-effect generation and assets"},{"name":"Animations","description":"Animation runs, frames and exports"},{"name":"Labels","description":"Project labels and tagging"},{"name":"Art styles","description":"Reusable project art styles"},{"name":"Usage","description":"Credit usage and balance"},{"name":"API keys","description":"Scope-scoped API keys"}],"externalDocs":{"url":"https://github.com/gametorch","description":"Official gametorch CLI and the Python, TypeScript, Go and Rust SDKs, with examples"}}