AITOPIA REST API
Generate images, videos and audio from your own application with one API key.
The AITOPIA REST API lets your server run AITOPIA models, edit existing media and submit batches of generations over plain HTTPS. It is the same generation layer the AITOPIA app and the AITOPIA MCP server use: same models, same prices, same input validation and the same output checks.
- Base URLs: live
https://api-live.aitopia.ai, sandboxhttps://api-sandbox.aitopia.ai(test keys, simulated runs, nothing charged; see Sandbox). Every path starts with/v1, for examplehttps://api-live.aitopia.ai/v1/models. - Auth:
Authorization: Key <your key>(Authentication) - Format: JSON request and response bodies,
snake_casefield names - Billing: credits come from the AITOPIA account that owns the key (Billing & retention)
#How it works
Generation is asynchronous. A submit call answers at once with 202 Accepted and a request_id; you then poll the request or receive a signed webhook when it finishes.
POST /v1/models/{model_id} -> 202 { request_id, status: "queued", status_url, cancel_url, ... }
GET /v1/requests/{id} -> 200 { status: "running", ... }
GET /v1/requests/{id} -> 200 { status: "completed", output: { images: [{ url, content_type }] } }Read Requests & lifecycle for the full picture, then Polling or Webhooks.
#What you can call
| Endpoint | Purpose |
|---|---|
GET /v1/models | List and search the models you can run |
GET /v1/models/{model_id} | Input schema and price of one model |
POST /v1/models/{model_id} | Run a model |
POST /v1/edit | Edit an existing image, video or audio file from a plain-language instruction |
POST /v1/batch | Submit 1 to 12 independent generations as one request |
GET /v1/requests/{request_id} | Status and result of a request |
POST /v1/requests/{request_id}/cancel | Ask to cancel a request |
POST /v1/uploads | Host a file (base64 or import from a URL) |
POST /v1/uploads/link | One-time upload URL for files up to 95 MB |
GET /v1/account/balance | Credit balance of the key owner |
Every endpoint is described in the Endpoints reference.
#Models
The catalogue changes often, so models are not listed in these docs. Call GET /v1/models (filter with type and q) to see what you can run, and GET /v1/models/{model_id} for a model's input fields and price. Model ids contain a slash, for example google/nano-banana-2 (image), minimax/h3-max or google/veo-3.1-lite (video), minimax/speech-2.8-hd (speech) and minimax/music-3 (music). Send the slash as it is or encoded as %2F (OpenAPI-generated clients encode it); both reach the same model. The examples in these docs send only prompt; real models take more fields (images, durations, resolutions), listed by GET /v1/models/{model_id}.
#Machine-readable files
- openapi.json: OpenAPI 3.1 description of every endpoint. The API also serves it, without a key, at
GET https://api-live.aitopia.ai/v1/openapi.json. - llms.txt: a compact index of these docs for AI agents and coding assistants.
#Next steps
- Quickstart: create a key and run your first model in a few minutes.
- Errors & retries: every error code and when to retry.