Ludo.ai Files API
Upload input files (images, sprites, videos) that generation operations reference by URL.
Upload input files (images, sprites, videos) that generation operations reference by URL.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/ludo-ai:ludo-ai-files-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
version: 0.9.10
title: Ludo.ai Files API
description: "The Ludo.ai API enables you to generate game assets programmatically, including images, videos, 3D models, spritesheets, and audio.\n\n# Getting Started\n\n## Base URL\nAll API requests should be made to: `https://api.ludo.ai/api`\n\n## Authentication\nInclude your API key in the `Authorization` header:\n```\nAuthorization: ApiKey YOUR_API_KEY\n```\n\n## Models\nPick from the current models for any new integration:\n\n- `hydra` (Hydra) - Best motion and prompt adherence.\n- `griffin-hd` (Griffin) - Cinematic videos in any style, with audio, 768p.\n- `ignis` (Ignis) - Cheapest alternative, for simple body shapes and simple actions.\n- `ignis-pixel` (Ignis Pixel) - Best for low-res pixel art animations\n\nWhich models each action accepts (in preference order):\n\n- sprite animation: `hydra`, `griffin-hd`, `ignis`, `ignis-pixel`\n- motion transfer: `hydra`, `ignis`, `ignis-pixel`\n- spritesheet editing: `hydra`, `griffin-hd`\n- new view: `hydra`\n- video generation: `griffin-hd`, `ignis`\n- references to video: `griffin-hd`\n- video editing: `griffin-hd`\n\n**Legacy models** are still accepted so existing integrations keep working, but they are scheduled for removal - do not use them for new work:\n\n- `hydra-plus` (Hydra+) - legacy since 2026-11-02\n- `blitz` (Blitz) - legacy since 2026-09-17\n- `eagle` (Eagle) - legacy since 2026-09-17\n- `eagle-audio` (Eagle with Audio) - legacy since 2026-09-17\n- `forge` (Forge) - legacy since 2026-11-16\n- `forge-pixel` (Forge Pixel) - legacy since 2026-11-16\n- `tango` (Tango) - legacy since 2026-09-17\n\nEach generation endpoint lists its own models, rates and durations in its `model` parameter description.\n\n## Timeout\nGeneration requests return `202` immediately (see below) and hold no connection open while the work runs. If you opt into a synchronous response with `async: false`, include a generous timeout (at least 20 minutes): the call is held for at most 15 minutes, and past that you receive `202` with the job instead of an error and resume with `GET /assets/jobs/{id}`.\n\n## Documentation\n`GET /docs/search?query=...` searches Ludo's feature guides with a plain-language\nquestion and returns the few sections that answer it (each names a `doc` and\n`section`). `GET /docs` lists every document and section, and `GET /docs?doc=...`\nreads one in full. Both are free (no credits) and rate-limited: 60 requests per 5 minutes\nand 1000 per day for search, 150 per 5 minutes for reading. Read the relevant guide before\nyour first call to a generator: it explains modes, models, margins and known limitations.\n\n## Async Usage\nGeneration endpoints are asynchronous: you submit the work, get a job id back, and\ncollect the result when it is ready. Nothing is held open while a GPU runs.\n\n1. **Submit** the generation. The API responds immediately with\n `202 { id, status: \"queued\" }`.\n2. **Poll** `GET /assets/jobs/{id}` until `status` is `succeeded` or `failed`.\n Non-terminal responses carry `poll_after_ms` - wait at least that long before the\n next poll. Better still, long-poll: `GET /assets/jobs/{id}?wait=30` holds the\n request up to 30 s (max 60) and returns the moment the job finishes.\n3. **Read** `result` - it is exactly the response documented for that operation. On a\n failure, read `error` instead.\n\n`GET /assets/jobs` lists your recent jobs, and `DELETE /assets/jobs/{id}` cancels one\nthat has not finished yet (credits are refunded).\n\nJob-status endpoints are rate-limited to 150 requests per 5 minutes per API key; a\n`429` carries `Retry-After`. Each account may have up to 50 generations queued or\nrunning at once via the API; a request beyond that returns `429` (code\n`PENDING_JOBS_LIMIT`) - wait for jobs to finish, then submit again.\n\n### Synchronous responses (deprecated)\nPassing `async: false` in the payload opts into a synchronous response: the call blocks\nuntil the result is ready and returns it as the response body. This is deprecated, but\nthe opt-out is permanent and stays supported.\n\nSynchronous calls run on the same queue: the response carries an `X-Ludo-Job-Id`\nheader, and if the job is still running after 15 minutes you receive `202` with the job\ninstead of an error - resume with `GET /assets/jobs/{id}`.\n\nThe legacy `request_id` + `GET /assets/{type}/results` flow keeps working unchanged.\n\n### Legacy results endpoints\nEach asset type still has a results endpoint:\n- `GET /assets/images/results` - images\n- `GET /assets/sprites/results` - spritesheets\n- `GET /assets/videos/results` - videos\n- `GET /assets/audio/results` - audio\n- `GET /assets/3d-models/results` - 3D models\n\nResults are available for 7 days and return the 100 most recent API-generated assets. The `request_id` query parameter is optional - omit it to list all recent results.\n\n## Directional Sprites\nDirectional Sprites render one 3D model as sprites seen from up to 8 directions that line up. The calls go in this order:\n1. *(Optional)* `POST /assets/3d-model/image` (create3DModelImage): a character image from a `prompt`, or your own `image` redrawn as a 3D render (the prompt then says what to change). Call again for another try.\n2. `POST /assets/3d-model` (create3DModel) with that image and `rig: true`, for a rigged GLB. A model you already have can be rigged with `POST /assets/3d-model/rig` (rigModel).\n *(Optional)* accessories - a sword, a gun, a shield, a helmet, a backpack: an item GLB (create3DModel, no rig) held by a bone of the model. `POST /assets/sprite/directional-accessory-fit` (fitDirectionalAccessory, free) fits one automatically for its `kind` and answers previews, numeric `checks` and a `placement`; call it again with `size`, `move` and `turn` (relative to the automatic fit) until it looks right. Then `POST /assets/sprite/directional-accessories` (attachDirectionalAccessories, free) with every item's placement: its `model_url` is the model holding them, to pass as `model` below.\n3. *(Optional)* an animation, at most one: a `preset_id` from `GET /assets/sprite/animation-presets` (listAnimationPresets), an `animation_id` from `POST /assets/animation` (createAnimation, a move generated from a text prompt) or `GET /assets/animations` (listMyAnimations), or an `animation_url` made for this model by animate3DModelPreset or animate3DModel. With none, the sprites are a still pose.\n4. `GET /assets/sprite/directional-styles` (listDirectionalSpriteStyles, free): pick a `style_id` and its `style_params`.\n5. `POST /assets/sprite/directional-preview` (previewDirectionalSprites, free and synchronous): check the look from the directions you want. One preview at a time; a newer one cancels yours.\n6. `POST /assets/sprite/directional` (createDirectionalSprites) for one spritesheet per direction, or `POST /assets/sprite/directional-stills` (createDirectionalStills) for one large image per direction. Pass the GLB as `model`, the animation, the style and up to 8 `directions`.\n\nRead the full guide with `GET /docs?doc=directional-sprites`.\n\n## Asset URL Expiration\nAll generated asset URLs (images, spritesheets, videos, audio, 3D models) are temporary and expire after **7 days**. If you need to keep an asset, download it before it expires.\n\n## Request Format\n- Use `Content-Type: application/json` for all requests\n- All responses are returned in JSON format\n\n## Credits\nEach API call consumes credits from your account. The credit cost varies by endpoint and is documented in each endpoint's description.\n\n> **Note:** All API requests consume credits, even if your subscription includes unlimited credits for the web application. Check your account dashboard for your current API credit balance.\n"
x-logo:
url: /static/logo-small.png
altText: Logo
x-model-lineup: 'Current models: hydra (Hydra) - Best motion and prompt adherence. griffin-hd (Griffin) - Cinematic videos in any style, with audio, 768p. ignis (Ignis) - Cheapest alternative, for simple body shapes and simple actions. ignis-pixel (Ignis Pixel) - Best for low-res pixel art animations. Per action - sprite animation: hydra, griffin-hd, ignis, ignis-pixel; motion transfer: hydra, ignis, ignis-pixel; spritesheet editing: hydra, griffin-hd; new view: hydra; video generation: griffin-hd, ignis; references to video: griffin-hd; video editing: griffin-hd. LEGACY models, still accepted but scheduled for removal - do not use them for new work: hydra-plus, blitz, eagle, eagle-audio, forge, forge-pixel, tango.'
servers:
- url: /api
tags:
- name: Files
paths:
/assets/uploads:
post:
description: Start an upload of a local file, so it can be passed to a generation endpoint by URL instead of inline as base64. Declare the file's MIME type and exact size in bytes (up to 15MB, the same limit the generation endpoints apply); the response carries an upload_url and a file_url. Send the file's bytes in a single PUT to upload_url (no Authorization header; the content type and size are fixed by this call, and a body of any other size is refused). Once the PUT succeeds, pass file_url in any image, audio, video or model field that accepts a URL. The file is public to anyone holding file_url and is deleted 7 days after upload. upload_url is single-use. Free (no credits). Requires an API key (user scope). Not exposed as an MCP tool.
tags:
- Files
operationId: createUpload
x-mcp-exclude: true
security:
- ApiKey: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateUploadPayload'
required: true
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/UploadSession'
'400':
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
x-codeSamples:
- lang: Shell
label: cURL
source: "curl -X POST \"https://api.ludo.ai/api/assets/uploads\" \\\n -H \"Authorization: ApiKey YOUR_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"mime_type\":\"image/png\",\"size\":1}'"
- lang: JavaScript
label: JavaScript
source: "const response = await fetch(\"https://api.ludo.ai/api/assets/uploads\", {\n method: \"POST\",\n headers: {\n \"Authorization\": \"ApiKey YOUR_API_KEY\",\n \"Content-Type\": \"application/json\"\n },\n body: JSON.stringify({\n \"mime_type\": \"image/png\",\n \"size\": 1\n })\n});\n\nconst data = await response.json();\nconsole.log(data);"
- lang: Python
label: Python
source: "import requests\n\nresponse = requests.post(\n \"https://api.ludo.ai/api/assets/uploads\",\n headers={\n \"Authorization\": \"ApiKey YOUR_API_KEY\",\n \"Content-Type\": \"application/json\"\n },\n json={\n \"mime_type\": \"image/png\",\n \"size\": 1\n }\n)\n\nprint(response.json())"
components:
schemas:
ErrorResponse:
type: object
properties:
message:
type: string
metadata:
type: string
error_payload:
type: string
intent:
type: object
description: Stripe intent details sent with 3D Secure (406) errors
properties:
id:
type: string
type:
type: string
enum:
- payment
- setup
example: payment
client_secret:
type: string
UploadSession:
type: object
required:
- upload_url
- file_url
- mime_type
- size
properties:
upload_url:
type: string
description: Single-use URL to PUT the file's bytes to, with no Authorization header.
example: <url>
file_url:
type: string
description: Public URL of the file once the PUT succeeds. Pass it to any field that accepts a URL. Deleted 7 days after upload.
example: <url>
mime_type:
type: string
description: The MIME type the file is stored and served with.
size:
type: integer
format: int64
description: The exact number of bytes the PUT must send.
CreateUploadPayload:
type: object
description: Payload for starting a file upload.
required:
- mime_type
- size
properties:
mime_type:
type: string
description: MIME type of the file. Fixed for the upload; the stored file is served with it.
enum:
- image/png
- image/jpeg
- image/webp
- image/gif
- audio/mpeg
- audio/wav
- audio/x-wav
- audio/ogg
- audio/flac
- audio/mp4
- audio/aac
- audio/webm
- video/mp4
- video/webm
- video/quicktime
- model/gltf-binary
example: image/png
size:
type: integer
format: int64
minimum: 1
maximum: 15728640
description: Exact size of the file in bytes (at most 15MB). The PUT to upload_url must send exactly this many bytes.
securitySchemes:
ApiKey:
type: apiKey
name: Authorization
in: header
description: 'For accessing the API a valid API Key token must be passed in all the queries in
the ''Authorization'' header.
The following syntax must be used in the ''Authorization'' header: ApiKey xxxxxx.yyyyyyy.zzzzzz
'