Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
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. 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.
openapi: 3.2.0
info:
title: AITOPIA REST Account 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: Account
paths:
/v1/account/balance:
get:
operationId: getBalance
summary: Credit balance
responses:
'200':
description: Balance
content:
application/json:
schema:
type: object
properties:
credits:
type:
- number
- 'null'
unlimited:
type: boolean
paid_credits:
type:
- number
- 'null'
daily_credits_remaining:
type:
- number
- 'null'
daily_allowance:
type:
- number
- 'null'
sandbox:
type: boolean
description: 'Only on api-sandbox: true. The fixed play balance; nothing is charged.'
'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:
- Account
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.'
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.'