Schemas
Objects shared by several endpoints.
Objects shared by several endpoints, as defined in the OpenAPI document.
#Error
| Field | Type | Required | Description |
|---|
error | object | yes | |
request_id | string | no | Present when the request was recorded before it failed: check GET /v1/requests/{request_id} before retrying. |
Fields of error:
| Field | Type | Required | Description |
|---|
error.code | string | yes | |
error.message | string | yes | |
error.retryable | boolean | yes | |
error.field | string | no | |
error.retry_after_seconds | number | no | |
#Price
Object, or null.
| Field | Type | Required | Description |
|---|
credits | number | null | no | |
min | number | no | |
max | number | no | |
per_second | number | no | |
#Model
| Field | Type | Required | Description |
|---|
id | string | no | |
type | string | null | no | |
name | string | no | |
description | string | null | no | |
capabilities | array of string | no | |
price | Price | no | |
execution_mode | string | null | no | |
recommended | boolean | no | |
| Field | Type | Required | Description |
|---|
url | string (uri) | yes | |
content_type | string | yes | |
width | number | no | |
height | number | no | |
duration | number | no | |
#Output
| Field | Type | Required | Description |
|---|
images | array of Media | yes | |
videos | array of Media | yes | |
audio | array of Media | yes | |
files | array of object | yes | |
#RequestStatus
String, one of: queued, running, completed, partial, failed, cancelled.
#Item
| Field | Type | Required | Description |
|---|
index | integer | no | |
status | RequestStatus | yes | |
output | Output | yes | |
error | Error.error | no | |
credits_estimated | number | null | no | |
#Request
| Field | Type | Required | Description |
|---|
request_id | string | yes | |
status | RequestStatus | yes | |
endpoint | string | yes | |
created_at | string (date-time) | yes | |
completed_at | string | null (date-time) | yes | |
credits_estimated | number | null | yes | |
output | Output | yes | |
items | array of Item | no | |
error | Error.error | no | |
aitopia_url | string (uri) | no | |
status_url | string (uri) | yes | |
result_url | string (uri) | yes | |
cancel_url | string (uri) | yes | |
#DryRun
| Field | Type | Required | Description |
|---|
dry_run | true | no | |
endpoint | string | no | |
credits_estimated | number | null | no | |
affordable | boolean | null | no | |
credits_available | number | string | null | no | |
complete | boolean | no | |
basis | string | no | |
plan_token | string | no | edit only: send it to POST /v1/edit to run exactly this priced plan. |
plan_token_expires_in_sec | number | no | |
items | array of object | no | |
#BatchItem
| Field | Type | Required | Description |
|---|
kind | string | yes | |
prompt | string | yes | |
model_id | string | yes | |
input | object | no | |
asset_name | string | no | |
#Cancel
| Field | Type | Required | Description |
|---|
request_id | string | yes | |
cancel | cancelled | cancellation_requested | cannot_cancel | already_terminal | yes | |
will_be_charged | boolean | no | |
#Webhook
Body of the signed POST sent to webhook_url: the same object GET /v1/requests/{request_id} returns. Headers: X-AITOPIA-Signature: t=,v1=<hex hmac-sha256(webhook_secret, ".")>; X-AITOPIA-Request-Id (use it to dedupe). Retried for up to 24 hours.
| Field | Type | Required | Description |
|---|
request_id | string | yes | |
status | RequestStatus | yes | |
endpoint | string | yes | |
created_at | string (date-time) | yes | |
completed_at | string | null (date-time) | yes | |
credits_estimated | number | null | yes | |
output | Output | yes | |
items | array of Item | no | |
error | Error.error | no | |
aitopia_url | string (uri) | no | |
status_url | string (uri) | yes | |
result_url | string (uri) | yes | |
cancel_url | string (uri) | yes | |