API

Models

List models and read one model's input schema and price.

The model catalogue changes often; read it from the API instead of hard-coding ids. Model ids may contain a slash (for example google/nano-banana-2): put them in the path as they are. To run a model, see Runs.

MethodPathSummary
GET/v1/modelsList models.
GET/v1/models/{model_id}Input schema and price of one model.

#GET /v1/models

List models.

Authentication: Authorization: Key <key>.

type is one of image, video, audio, text; q searches id, name and capabilities. Page with offset = next_offset while has_more is true. Field values in the example are illustrative.

#Query parameters

NameTypeRequiredDescription
typestringno
qstringno
limitinteger (min 1)no
offsetinteger (min 0)no

#Responses

StatusDescriptionBody
200Models pageobject
400INVALID_INPUT (with field), URL_NOT_ALLOWED, MODEL_REQUIRED, MODEL_KIND_MISMATCH, MODEL_NOT_ALLOWED, DUPLICATE_ITEM or INVALID_RUN_TOKENError
401UNAUTHENTICATED (missing/invalid/revoked key) or KEY_SESSION_EXPIRED (sign in to aitopia.ai to reactivate the key)Error
429RATE_LIMIT, RUN_LIMITED or QUEUE_LIMIT_EXCEEDED (see retry_after_seconds and the Retry-After header)Error
500INTERNAL_ERROR (an unexpected server error)Error

#Example

Request
curl "https://api-live.aitopia.ai/v1/models?type=image&limit=2" \
  -H "Authorization: Key $AITOPIA_KEY"
Response 200
{
  "models": [
    {
      "id": "google/nano-banana-2",
      "type": "image",
      "name": "Nano Banana 2",
      "description": "...",
      "capabilities": [
        "..."
      ],
      "price": {
        "credits": 4
      },
      "execution_mode": "...",
      "recommended": true
    }
  ],
  "has_more": true,
  "next_offset": 2
}

#GET /v1/models/{model_id}

Input schema and price of one model.

Authentication: Authorization: Key <key>.

input_schema is the JSON Schema of the body you send to POST /v1/models/{model_id}. The example schema is shortened.

#Path parameters

NameTypeRequiredDescription
model_idstringyesModel id, for example google/nano-banana-2. Send the "/" as it is or encoded as %2F (generated clients encode it); both reach the same model.

#Responses

StatusDescriptionBody
200Model schemaobject
401UNAUTHENTICATED (missing/invalid/revoked key) or KEY_SESSION_EXPIRED (sign in to aitopia.ai to reactivate the key)Error
404MODEL_NOT_FOUND or NOT_FOUNDError
429RATE_LIMIT, RUN_LIMITED or QUEUE_LIMIT_EXCEEDED (see retry_after_seconds and the Retry-After header)Error
500INTERNAL_ERROR (an unexpected server error)Error

#Example

Request
curl "https://api-live.aitopia.ai/v1/models/google/nano-banana-2" \
  -H "Authorization: Key $AITOPIA_KEY"
Response 200
{
  "id": "google/nano-banana-2",
  "input_schema": {
    "type": "object",
    "properties": {
      "prompt": {
        "type": "string"
      }
    },
    "required": [
      "prompt"
    ]
  },
  "price": {
    "credits": 4
  }
}
AITOPIA REST API · Live https://api-live.aitopia.ai/v1 · Sandbox https://api-sandbox.aitopia.ai/v1