GameTorch REST API โ€“ Animations

GameTorch exposes a RESTful interface so you can programmatically create and manage animations. You will first need an API key โ€“ sign in to GameTorch, visit /account and click "Create New API Key". Send the key on each request using either the Authorization: Bearer <API_KEY> header or X-Api-Key: <API_KEY>.

Prefer using the official GameTorch CLI (under construction) for simpler scripting and downloads: https://github.com/gametorch/gametorch.

Endpoints

Examples

Create an animation

curl -X POST https://gametorch.app/api/animation \
    -H "Authorization: Bearer $API_KEY" \
    -H "Content-Type: application/json" \
 -d '{
   "animation_model_id": 1,
   "prompt": "walking to the right",
   "duration_seconds": 5,
   "input_image_base64": ""
}'

Regenerate an animation

curl -X POST https://gametorch.app/api/animation/regenerate/123 \
    -H "Authorization: Bearer $API_KEY"

List your animations

curl -H "Authorization: Bearer $API_KEY" \
     "https://gametorch.app/api/animations?offset=0&limit=50"

Get results for one animation

curl -H "Authorization: Bearer $API_KEY" \
     https://gametorch.app/api/animation_results/123

Request a result render (fast mode)

curl -X POST https://gametorch.app/api/animation_result \
    -H "Authorization: Bearer $API_KEY" \
    -H "Content-Type: application/json" \
 -d '{
   "animation_id": 123,
   "fps": 12,
   "go_fast": true
}'

Check queue position

curl -H "Authorization: Bearer $API_KEY" \
     https://gametorch.app/api/queue_position/456

Download result frames as ZIP

curl -H "Authorization: Bearer $API_KEY" -o anim.zip \
     https://gametorch.app/api/animation_result_zip/456

Create a crop clip

curl -X POST https://gametorch.app/api/animation_result_crop \
    -H "Authorization: Bearer $API_KEY" \
    -H "Content-Type: application/json" \
 -d '{
   "animation_result_id": 456,
   "start_frame": 1,
   "end_frame": 24,
   "fps": 12,
   "crop_x": 0,
   "crop_y": 0,
   "crop_width": 512,
   "crop_height": 512,
   "label": "Hero entrance"
}'

Download a crop

curl -H "Authorization: Bearer $API_KEY" -o crop.zip \
     https://gametorch.app/api/animation_result_crop/789