Endpoints reference
Every endpoint of the AITOPIA REST API.
Base URL: https://api-live.aitopia.ai (live) and https://api-sandbox.aitopia.ai (sandbox, test keys, nothing charged). All paths start with /v1. Every endpoint except GET /v1/openapi.json needs Authorization: Key <key> (Authentication). Errors use one body format.
This reference is generated from the OpenAPI document.
#Models
List models and read one model's input schema and price. Details.
| Method | Path | Summary |
|---|---|---|
GET | /v1/models | List models. |
GET | /v1/models/{model_id} | Input schema and price of one model. |
#Runs
Submit model runs, edits and batches. Details.
| Method | Path | Summary |
|---|---|---|
POST | /v1/models/{model_id} | Submit a model run. The body is the model input (see GET /v1/models/{model_id}). |
POST | /v1/edit | Edit an asset from an instruction. |
POST | /v1/batch | Submit 1 to 12 generations as one request. |
#Requests
Read the status and result of a request, or cancel it. Details.
| Method | Path | Summary |
|---|---|---|
GET | /v1/requests/{request_id} | Status and result of a request (owner only). |
GET | /v1/requests/{request_id}/status | Alias of GET /v1/requests/{request_id}. |
POST | /v1/requests/{request_id}/cancel | Ask to cancel a request. |
#Uploads
Host files on AITOPIA to use them as model or edit input. Details.
| Method | Path | Summary |
|---|---|---|
POST | /v1/uploads | Host a file (base64 up to about 19 MB, or import from source_url). |
POST | /v1/uploads/link | Get a one-time upload URL for files up to 95 MB (PUT the bytes; the answer holds the file URL). |
#Account
Credit balance of the key owner. Details.
| Method | Path | Summary |
|---|---|---|
GET | /v1/account/balance | Credit balance. |
#OpenAPI document
The machine-readable description of the API. Details.
| Method | Path | Summary |
|---|---|---|
GET | /v1/openapi.json | This document (public, no key). |
#Schemas
Shared objects: Error, Price, Model, Media, Output, RequestStatus, Item, Request, DryRun, BatchItem, Cancel, Webhook.