AITOPIA Models API

The Models API from AITOPIA — 2 operation(s) for models.

Operations 3

GET /v1/models List models #
GET /v1/models/{model_id} Input schema and price of one model #
POST /v1/models/{model_id} Submit a model run. The body is the model input (see GET /v1/models/{model_id}) #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • 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.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/aitopia-ai:aitopia-ai-models-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API 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. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

aitopia-ai-models-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: AITOPIA REST Models API
  version: 1.0.0
  description: 'Run AITOPIA models, edits and batches over HTTP. Submit calls return a request_id; poll GET /v1/requests/{request_id} (optionally with ?wait=N) or receive a signed webhook. Results are kept 30 days. Credit figures are estimates. The sandbox server takes test keys (aitk_test_...): same requests and validation, simulated results, no credits spent.'
servers:
- url: https://api-live.aitopia.ai
  description: 'Live: real runs, credits are charged. Live keys (aitk_live_...).'
- url: https://api-sandbox.aitopia.ai
  description: 'Sandbox: simulated runs, nothing is charged. Test keys (aitk_test_...).'
security:
- Key: []
tags:
- name: Models
paths:
  /v1/models:
    get:
      operationId: listModels
      summary: List models
      parameters:
      - name: type
        in: query
        schema:
          type: string
      - name: q
        in: query
        schema:
          type: string
      - name: limit
        in: query
        schema:
          type: integer
          minimum: 1
      - name: offset
        in: query
        schema:
          type: integer
          minimum: 0
      responses:
        '200':
          description: Models page
          content:
            application/json:
              schema:
                type: object
                properties:
                  models:
                    type: array
                    items:
                      $ref: '#/components/schemas/Model'
                  has_more:
                    type: boolean
                  next_offset:
                    type:
                    - integer
                    - 'null'
        '400':
          description: INVALID_INPUT (with field), URL_NOT_ALLOWED, MODEL_REQUIRED, MODEL_KIND_MISMATCH, MODEL_NOT_ALLOWED, DUPLICATE_ITEM or INVALID_RUN_TOKEN
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: UNAUTHENTICATED (missing/invalid/revoked key) or KEY_SESSION_EXPIRED (sign in to aitopia.ai to reactivate the key)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: RATE_LIMIT, RUN_LIMITED or QUEUE_LIMIT_EXCEEDED (see retry_after_seconds and the Retry-After header)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: INTERNAL_ERROR (an unexpected server error)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Models
  /v1/models/{model_id}:
    get:
      operationId: getModelSchema
      summary: Input schema and price of one model
      parameters:
      - name: model_id
        in: path
        required: true
        description: Model 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.
        schema:
          type: string
      responses:
        '200':
          description: Model schema
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  input_schema:
                    type:
                    - object
                    - 'null'
                    additionalProperties: true
                  price:
                    $ref: '#/components/schemas/Price'
        '401':
          description: UNAUTHENTICATED (missing/invalid/revoked key) or KEY_SESSION_EXPIRED (sign in to aitopia.ai to reactivate the key)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: MODEL_NOT_FOUND or NOT_FOUND
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: RATE_LIMIT, RUN_LIMITED or QUEUE_LIMIT_EXCEEDED (see retry_after_seconds and the Retry-After header)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: INTERNAL_ERROR (an unexpected server error)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Models
    post:
      operationId: runModel
      summary: Submit a model run. The body is the model input (see GET /v1/models/{model_id})
      description: Besides the model input, the body may carry webhook_url and asset_name.
      parameters:
      - name: model_id
        in: path
        required: true
        description: Model 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.
        schema:
          type: string
      - name: wait
        in: query
        required: false
        description: Long-poll up to N seconds (integer 0-60) for a terminal status.
        schema:
          type: integer
          minimum: 0
          maximum: 60
      - name: dry_run
        in: query
        required: false
        description: true/1/yes returns a price estimate and runs nothing; false/0/no (or absent) runs. Anything else is a 400.
        schema:
          type: string
          enum:
          - 'true'
          - '1'
          - 'yes'
          - 'false'
          - '0'
          - 'no'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
              properties:
                webhook_url:
                  type: string
                  format: uri
                  description: Optional https URL (public host only) that receives the final result as a signed POST.
                asset_name:
                  type: string
      responses:
        '200':
          description: Dry run estimate (dry_run=true)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DryRun'
        '202':
          description: Accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Request'
        '400':
          description: INVALID_INPUT (with field), URL_NOT_ALLOWED, MODEL_REQUIRED, MODEL_KIND_MISMATCH, MODEL_NOT_ALLOWED, DUPLICATE_ITEM or INVALID_RUN_TOKEN
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: UNAUTHENTICATED (missing/invalid/revoked key) or KEY_SESSION_EXPIRED (sign in to aitopia.ai to reactivate the key)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: INSUFFICIENT_CREDITS, KEY_CREDIT_CAP_REACHED or OVER_BUDGET
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: MODEL_NOT_FOUND or NOT_FOUND
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: PRICE_CHANGED, PRICE_UNKNOWN or PLAN_EXPIRED
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: PLAN_INVALID, ASSET_UNREACHABLE or NOT_SUPPORTED
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: RATE_LIMIT, RUN_LIMITED or QUEUE_LIMIT_EXCEEDED (see retry_after_seconds and the Retry-After header)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: INTERNAL_ERROR (an unexpected server error)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '502':
          description: 'UPSTREAM_5XX, or UPSTREAM_UNCERTAIN (the run may have started: check the request_id in the body and your balance before retrying)'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: MODEL_UNAVAILABLE, SERVER_RESTARTING or SESSION_UNAVAILABLE (retryable)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '504':
          description: TIMEOUT
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Models
webhooks:
  requestFinished:
    post:
      summary: Sent to your webhook_url when a request reaches a terminal status
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Webhook'
      responses:
        2XX:
          description: Acknowledged. Anything else is retried for up to 24 hours.
      tags:
      - Models
components:
  schemas:
    Error:
      type: object
      required:
      - error
      properties:
        error:
          type: object
          required:
          - code
          - message
          - retryable
          properties:
            code:
              type: string
            message:
              type: string
            retryable:
              type: boolean
            field:
              type: string
            retry_after_seconds:
              type: number
        request_id:
          type: string
          description: 'Present when the request was recorded before it failed: check GET /v1/requests/{request_id} before retrying.'
    Model:
      type: object
      properties:
        id:
          type: string
        type:
          type:
          - string
          - 'null'
        name:
          type: string
        description:
          type:
          - string
          - 'null'
        capabilities:
          type: array
          items:
            type: string
        price:
          $ref: '#/components/schemas/Price'
        execution_mode:
          type:
          - string
          - 'null'
        recommended:
          type: boolean
    Media:
      type: object
      required:
      - url
      - content_type
      properties:
        url:
          type: string
          format: uri
        content_type:
          type: string
        width:
          type: number
        height:
          type: number
        duration:
          type: number
    Output:
      type: object
      required:
      - images
      - videos
      - audio
      - files
      properties:
        images:
          type: array
          items:
            $ref: '#/components/schemas/Media'
        videos:
          type: array
          items:
            $ref: '#/components/schemas/Media'
        audio:
          type: array
          items:
            $ref: '#/components/schemas/Media'
        files:
          type: array
          items:
            type: object
            properties:
              url:
                type: string
              content_type:
                type:
                - string
                - 'null'
    Item:
      type: object
      required:
      - status
      - output
      properties:
        index:
          type: integer
        status:
          $ref: '#/components/schemas/RequestStatus'
        output:
          $ref: '#/components/schemas/Output'
        error:
          $ref: '#/components/schemas/Error/properties/error'
        credits_estimated:
          type:
          - number
          - 'null'
    RequestStatus:
      type: string
      enum:
      - queued
      - running
      - completed
      - partial
      - failed
      - cancelled
    DryRun:
      type: object
      properties:
        dry_run:
          const: true
        endpoint:
          type: string
        credits_estimated:
          type:
          - number
          - 'null'
        affordable:
          type:
          - boolean
          - 'null'
        credits_available:
          type:
          - number
          - string
          - 'null'
        complete:
          type: boolean
        basis:
          type: string
        plan_token:
          type: string
          description: 'edit only: send it to POST /v1/edit to run exactly this priced plan.'
        plan_token_expires_in_sec:
          type: number
        items:
          type: array
          items:
            type: object
    Request:
      type: object
      required:
      - request_id
      - status
      - endpoint
      - created_at
      - completed_at
      - credits_estimated
      - output
      - status_url
      - result_url
      - cancel_url
      properties:
        request_id:
          type: string
        status:
          $ref: '#/components/schemas/RequestStatus'
        endpoint:
          type: string
        created_at:
          type: string
          format: date-time
        completed_at:
          type:
          - string
          - 'null'
          format: date-time
        credits_estimated:
          type:
          - number
          - 'null'
        output:
          $ref: '#/components/schemas/Output'
        items:
          type: array
          items:
            $ref: '#/components/schemas/Item'
        error:
          $ref: '#/components/schemas/Error/properties/error'
        aitopia_url:
          type: string
          format: uri
        status_url:
          type: string
          format: uri
        result_url:
          type: string
          format: uri
        cancel_url:
          type: string
          format: uri
    Webhook:
      description: 'Body of the signed POST sent to webhook_url: the same object GET /v1/requests/{request_id} returns. Headers: X-AITOPIA-Signature: t=<unix>,v1=<hex hmac-sha256(webhook_secret, "<t>.<raw body>")>; X-AITOPIA-Request-Id (use it to dedupe). Retried for up to 24 hours.'
      allOf:
      - $ref: '#/components/schemas/Request'
    Price:
      type:
      - object
      - 'null'
      properties:
        credits:
          type:
          - number
          - 'null'
        min:
          type: number
        max:
          type: number
        per_second:
          type: number
  securitySchemes:
    Key:
      type: http
      scheme: bearer
      bearerFormat: aitk_live_... or aitk_test_...
      description: 'Send "Authorization: Key <key>" (Bearer <key> is also accepted). Live keys work on the live server, test keys on the sandbox server. Create keys on your aitopia.ai profile.'