AITOPIA Requests API
The Requests API from AITOPIA — 3 operation(s) for requests.
The Requests API from AITOPIA — 3 operation(s) for requests.
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/aitopia-ai:aitopia-ai-requests-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:
title: AITOPIA REST Requests 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: Requests
paths:
/v1/requests/{request_id}:
get:
operationId: getRequest
summary: Status and result of a request (owner only)
parameters:
- name: request_id
in: path
required: true
description: The request_id returned by a submit call.
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
responses:
'200':
description: Request
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'
'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:
- Requests
/v1/requests/{request_id}/status:
get:
operationId: getRequestStatus
summary: Alias of GET /v1/requests/{request_id}
parameters:
- name: request_id
in: path
required: true
description: The request_id returned by a submit call.
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
responses:
'200':
description: Request
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'
'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:
- Requests
/v1/requests/{request_id}/cancel:
post:
operationId: cancelRequest
summary: Ask to cancel a request
parameters:
- name: request_id
in: path
required: true
description: The request_id returned by a submit call.
schema:
type: string
responses:
'200':
description: Cancel verdict
content:
application/json:
schema:
$ref: '#/components/schemas/Cancel'
'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'
'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'
tags:
- Requests
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.'
Cancel:
type: object
required:
- request_id
- cancel
properties:
request_id:
type: string
cancel:
type: string
enum:
- cancelled
- cancellation_requested
- cannot_cancel
- already_terminal
will_be_charged:
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
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
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.'