{
    "openapi": "3.1.0",
    "info": {
        "title": "deAPI REST API",
        "description": "Decentralized AI inference API for image generation, video processing, audio transcription, and more.\n\n## Rate limits\n\nTwo windows can apply to a request: a per-minute one (RPM) and a per-day one (RPD). Every\nthrottled response — success or 429 — carries the `X-RateLimit-*` headers, so you can pace\ntraffic without waiting to be rejected. Each header documents itself: see `components/headers`,\nor the headers listed on any response. What follows is only what a header cannot say about\nitself.\n\nWindows open on your first request into a bucket and run their full length from that second —\nnever to a calendar boundary, in any timezone. That is deliberate: a boundary every account\nshares is a boundary every account can double up on.\n\n**The headers describe the pool *this* request landed in, and `X-RateLimit-Source` is what\nidentifies it — not `X-RateLimit-Limit` alone.** A per-model limit is keyed to the model you\nnamed, so a request that carried no recognised `model` — rejected at validation, an unknown\nslug, an empty body — was counted against your tier pool, and it is the tier pool the headers\nthen describe. The two pools are fully independent: separate minute window, separate day,\nseparate `X-RateLimit-Daily-Reset`. This is a consequence of rate limiting running *before*\nvalidation, which is what keeps malformed traffic from reaching the rest of the API\nuncounted. Compare headers only across responses carrying the same `X-RateLimit-Source`.\n\n**Buckets are shared in ways worth knowing.** API **v1 and v2 count against the same bucket**,\nso migrating grants no fresh allowance and mixed traffic behaves as one stream. All `*/price`\nand `*/price-calculation` endpoints share a single quote bucket, separate from generation.\nPrompt enhancement (`/v2/prompts/enhancements`) has its own bucket as well, so heavy prompt\nwork no longer eats into your image throughput.\n\n**Counting is exact in sequence, best-effort in parallel.** Sent one after another, your\nrequests are counted precisely: the one that crosses the limit is the one that gets 429. Sent\nin parallel, a few beyond the limit can slip through, because the counter is read and then\nincremented as two steps and requests already in flight are not yet visible to one another.\nThe excess is bounded by how many of your own requests are in flight at once, and it only\never runs in your favour — you are never rejected while below your limit. So do not treat\n`X-RateLimit-Remaining` as a reservation: it is a snapshot, and a request you sent a\nmillisecond ago may already have spent what it shows.\n\n**Not every 429 comes from the request rate.** Creating API keys has its own hourly bucket,\nand a key with an IP whitelist has one for calls from addresses it refuses. A 429 always\ndescribes the bucket that actually refused it — `X-RateLimit-Type` names that bucket, and\nevery other `X-RateLimit-*` header on the response belongs to it. So back off on the headers\nyou were sent, and do not carry figures from one 429 over to the next.\n\n**A call refused by a key's IP whitelist does not spend the account's request allowance.**\nIt is counted against the address it came from instead, on a much tighter window — so a\nwhitelist cannot be turned against the owner it protects, and being refused still does not\ncome free.\n\nRequests rejected before authentication (HTTP 401) never reach the limiter and carry no\nrate-limit headers at all.",
        "contact": {
            "name": "deAPI Support",
            "url": "https://deapi.ai",
            "email": "support@deapi.ai"
        },
        "version": "0.0.1"
    },
    "servers": [
        {
            "url": "https://api.deapi.ai",
            "description": "Production API Server base URL"
        }
    ],
    "paths": {
        "/api/v2/account": {
            "get": {
                "tags": [
                    "Client API v2"
                ],
                "summary": "Get the account's billing",
                "description": "Balance and automatic top-up settings. Needs an ADMIN key.",
                "operationId": "getAccount",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptHeader"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The account's billing.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/AccountBilling"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing, unknown, expired or deactivated key — `code` says which: `missing_key`, `invalid_key`, `key_expired` or `key_revoked`.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/InsufficientPermissions"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimitExceeded"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/account/payments": {
            "get": {
                "tags": [
                    "Client API v2"
                ],
                "summary": "List the account's payments",
                "description": "Top-ups of the balance, newest first, in every status. Needs an ADMIN key.",
                "operationId": "listAccountPayments",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptHeader"
                    },
                    {
                        "$ref": "#/components/parameters/ListLimit"
                    },
                    {
                        "$ref": "#/components/parameters/ListPerPage"
                    },
                    {
                        "$ref": "#/components/parameters/ListPage"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A page of payments.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PaymentCollection"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing, unknown, expired or deactivated key — `code` says which: `missing_key`, `invalid_key`, `key_expired` or `key_revoked`.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/InsufficientPermissions"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimitExceeded"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/key": {
            "get": {
                "tags": [
                    "Client API v2"
                ],
                "summary": "Get the calling API key",
                "description": "The key sending the request: name, preview, role, status, dates, spend limit and IP whitelist. Never the secret. Works with any key role.",
                "operationId": "getCurrentApiKey",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptHeader"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The calling key.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/ApiKeyResource"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing, unknown, expired or deactivated key — `code` says which: `missing_key`, `invalid_key`, `key_expired` or `key_revoked`.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/InsufficientPermissions"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimitExceeded"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/keys": {
            "get": {
                "tags": [
                    "Client API v2"
                ],
                "summary": "List the account's API keys",
                "description": "Every key of the account, newest first. Needs an ADMIN key. Never secrets.",
                "operationId": "listApiKeys",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptHeader"
                    },
                    {
                        "$ref": "#/components/parameters/ListLimit"
                    },
                    {
                        "$ref": "#/components/parameters/ListPerPage"
                    },
                    {
                        "$ref": "#/components/parameters/ListPage"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A page of keys.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ApiKeyCollection"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing, unknown, expired or deactivated key — `code` says which: `missing_key`, `invalid_key`, `key_expired` or `key_revoked`.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/InsufficientPermissions"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimitExceeded"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "Client API v2"
                ],
                "summary": "Create an API key",
                "description": "Creates a key with the API role. Needs an ADMIN key; ADMIN keys can only be created in the Dashboard. **The secret is returned once, in this response.** Counts toward the account's limit of active keys and the hourly limit of keys created over the API (shared by all ADMIN keys of the account). An `ip_whitelist` given here applies from the key's first call.",
                "operationId": "createApiKey",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptHeader"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "name"
                                ],
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "example": "Customer 1234",
                                        "maxLength": 255
                                    },
                                    "expires_at": {
                                        "description": "Optional. Leave it out for a key that never expires. A date must be in the future and no later than 2038-01-19 03:14:07 UTC, the latest instant this platform can store — a 422, not a silently shortened key.",
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "format": "date-time",
                                        "example": "2026-12-31T23:59:59Z"
                                    },
                                    "role": {
                                        "description": "Only `api`. `admin` is refused with 403.",
                                        "type": "string",
                                        "example": "api",
                                        "enum": [
                                            "api",
                                            "admin"
                                        ]
                                    },
                                    "ip_whitelist": {
                                        "$ref": "#/components/schemas/ApiKeyIpWhitelist",
                                        "description": "Optional. The only addresses the new key may be used from; omitted or `[]` means any. Duplicates and surrounding whitespace are removed, an explicit `null` is refused."
                                    },
                                    "limit": {
                                        "$ref": "#/components/schemas/ApiKeySpendLimit",
                                        "description": "Optional. What this key may spend per window, in USD; omitted or `null` means no limit. Work that would take the key past it is refused with 402 `key_limit_exceeded`."
                                    },
                                    "reset_interval": {
                                        "description": "How often that limit starts over; `none` means it never does. Only accepted together with a non-null `limit`. Windows are anchored on the key's creation instant, not the calendar.",
                                        "type": "string",
                                        "example": "monthly",
                                        "default": "none",
                                        "enum": [
                                            "none",
                                            "daily",
                                            "weekly",
                                            "monthly"
                                        ]
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "The new key, with its secret.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/CreatedApiKeyResource"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing, unknown, expired or deactivated key — `code` says which: `missing_key`, `invalid_key`, `key_expired` or `key_revoked`.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/InsufficientPermissions"
                    },
                    "422": {
                        "$ref": "#/components/responses/ApiKeyLimitReached"
                    },
                    "429": {
                        "$ref": "#/components/responses/ApiKeyCreationRateLimited"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/keys/{id}": {
            "get": {
                "tags": [
                    "Client API v2"
                ],
                "summary": "Get an API key",
                "description": "Any key of the account. Needs an ADMIN key.",
                "operationId": "getApiKey",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptHeader"
                    },
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The key.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/ApiKeyResource"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing, unknown, expired or deactivated key — `code` says which: `missing_key`, `invalid_key`, `key_expired` or `key_revoked`.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/InsufficientPermissions"
                    },
                    "404": {
                        "description": "No such key on this account.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimitExceeded"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            },
            "delete": {
                "tags": [
                    "Client API v2"
                ],
                "summary": "Delete an API key",
                "description": "Permanently deletes an API-role key. Needs an ADMIN key; ADMIN keys are deleted in the Dashboard only. The key's past usage stays in usage reports.",
                "operationId": "deleteApiKey",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptHeader"
                    },
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "Deleted."
                    },
                    "401": {
                        "description": "Missing, unknown, expired or deactivated key — `code` says which: `missing_key`, `invalid_key`, `key_expired` or `key_revoked`.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/InsufficientPermissions"
                    },
                    "404": {
                        "description": "No such key on this account.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimitExceeded"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            },
            "patch": {
                "tags": [
                    "Client API v2"
                ],
                "summary": "Change an API key",
                "description": "Switches an API-role key on or off, changes its expiry date, spend limit and reset window, and sets the addresses it may be used from. Needs an ADMIN key. The role cannot be changed; ADMIN keys are changed in the Dashboard only. Making a key active again counts toward the limit of active keys.",
                "operationId": "updateApiKey",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptHeader"
                    },
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "active": {
                                        "description": "`false` disables the key, `true` enables it again.",
                                        "type": "boolean",
                                        "example": false
                                    },
                                    "expires_at": {
                                        "description": "`null` removes the expiry date. A date must be in the future and no later than 2038-01-19 03:14:07 UTC, the latest instant this platform can store — a 422, not a silently shortened key.",
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "format": "date-time",
                                        "example": "2027-01-31T23:59:59Z"
                                    },
                                    "ip_whitelist": {
                                        "$ref": "#/components/schemas/ApiKeyIpWhitelist",
                                        "description": "Replaces the whole list — entries are not merged with the ones already there. `[]` clears it and the key works from any address again; omitting the field leaves the list untouched, and an explicit `null` is refused."
                                    },
                                    "limit": {
                                        "$ref": "#/components/schemas/ApiKeySpendLimit",
                                        "description": "The new spend limit per window, in USD. `null` removes the limit; omitting the field leaves both the limit and what has been spent against it untouched. Changing the amount never resets the counter: raising it from 50 to 100 on a key that has already spent 50 leaves 50 of room, and lowering it below what has been spent accepts nothing more until the window resets."
                                    },
                                    "reset_interval": {
                                        "description": "The new window. Changing it restarts the counter. Can be sent on its own, but only for a key that already has a limit; alongside `\"limit\": null` it is refused.",
                                        "type": "string",
                                        "example": "daily",
                                        "enum": [
                                            "none",
                                            "daily",
                                            "weekly",
                                            "monthly"
                                        ]
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "The key after the change.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/ApiKeyResource"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing, unknown, expired or deactivated key — `code` says which: `missing_key`, `invalid_key`, `key_expired` or `key_revoked`.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/InsufficientPermissions"
                    },
                    "404": {
                        "description": "No such key on this account.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ApiKeyLimitReached"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimitExceeded"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/account/balance": {
            "get": {
                "tags": [
                    "Client API v2"
                ],
                "summary": "Get account balance",
                "description": "Retrieve the current account balance for the authenticated client. Needs an ADMIN key.",
                "operationId": "getAccountBalance",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptHeader"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Current client balance.",
                        "headers": {
                            "X-RateLimit-Policy": {
                                "$ref": "#/components/headers/X-RateLimit-Policy"
                            },
                            "X-RateLimit-Source": {
                                "$ref": "#/components/headers/X-RateLimit-Source"
                            },
                            "X-RateLimit-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Limit"
                            },
                            "X-RateLimit-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Remaining"
                            },
                            "X-RateLimit-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Reset"
                            },
                            "X-RateLimit-Daily-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Limit"
                            },
                            "X-RateLimit-Daily-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Remaining"
                            },
                            "X-RateLimit-Daily-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Reset"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ClientInfoResource"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized user.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/InsufficientPermissions"
                    },
                    "404": {
                        "description": "Request not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimitExceeded"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/jobs/{job_request}": {
            "get": {
                "tags": [
                    "Client API v2"
                ],
                "summary": "Get job status and result",
                "description": "Retrieve the current status and result of a submitted inference job.",
                "operationId": "getJob",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptHeader"
                    },
                    {
                        "name": "job_request",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "c08a339c-73e5-4d67-a4d5-231302fbff9a"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Current status of requested inference.",
                        "headers": {
                            "X-RateLimit-Policy": {
                                "$ref": "#/components/headers/X-RateLimit-Policy"
                            },
                            "X-RateLimit-Source": {
                                "$ref": "#/components/headers/X-RateLimit-Source"
                            },
                            "X-RateLimit-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Limit"
                            },
                            "X-RateLimit-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Remaining"
                            },
                            "X-RateLimit-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Reset"
                            },
                            "X-RateLimit-Daily-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Limit"
                            },
                            "X-RateLimit-Daily-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Remaining"
                            },
                            "X-RateLimit-Daily-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Reset"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/JobRequestStatusResource"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized user.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Request not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimitExceeded"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/models": {
            "get": {
                "tags": [
                    "Client API v2"
                ],
                "summary": "List available models",
                "description": "Lists the inference models available to your account. The list is scoped to you: it contains only enabled models that are either public or explicitly granted to your account, and it omits models that require a higher plan tier than your account has (those return 422 on generation and pricing). A model explicitly granted to your account is always listed, whatever tier it requires.",
                "operationId": "listModels",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptHeader"
                    },
                    {
                        "$ref": "#/components/parameters/ListLimit"
                    },
                    {
                        "$ref": "#/components/parameters/ListPerPage"
                    },
                    {
                        "$ref": "#/components/parameters/ListPage"
                    },
                    {
                        "$ref": "#/components/parameters/ClientModelsSort"
                    },
                    {
                        "name": "filter[inference_types]",
                        "in": "query",
                        "description": "Comma-separated inference types to filter by. Values are the type slugs returned in each model's `inference_types`. Example: txt2img,vid-upscale",
                        "required": false,
                        "style": "form",
                        "explode": false,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "txt2img",
                                    "txt2audio",
                                    "txt2music",
                                    "txt2video",
                                    "txt2embedding",
                                    "img2img",
                                    "img2txt",
                                    "img2video",
                                    "img-upscale",
                                    "img-rmbg",
                                    "audio2text",
                                    "audio2video",
                                    "audio_file2text",
                                    "video2text",
                                    "video_file2text",
                                    "vid-upscale",
                                    "vid-rmbg",
                                    "video2desc",
                                    "video_file2desc"
                                ]
                            }
                        }
                    },
                    {
                        "name": "filter[tags]",
                        "in": "query",
                        "description": "Comma-separated tags to filter by. Tags are controlled labels set per model; read the `tags` field of any model in this response to see which are in use. Example: new,experimental",
                        "required": false,
                        "style": "form",
                        "explode": false,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of available models.",
                        "headers": {
                            "X-RateLimit-Policy": {
                                "$ref": "#/components/headers/X-RateLimit-Policy"
                            },
                            "X-RateLimit-Source": {
                                "$ref": "#/components/headers/X-RateLimit-Source"
                            },
                            "X-RateLimit-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Limit"
                            },
                            "X-RateLimit-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Remaining"
                            },
                            "X-RateLimit-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Reset"
                            },
                            "X-RateLimit-Daily-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Limit"
                            },
                            "X-RateLimit-Daily-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Remaining"
                            },
                            "X-RateLimit-Daily-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Reset"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ClientDiffusionModelCollection"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized user.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Request not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimitExceeded"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/prompts/enhancements": {
            "post": {
                "tags": [
                    "Client API v2"
                ],
                "summary": "Enhance a prompt",
                "description": "Rewrites a prompt for a specific model using a guide configured for that model and inference type. Requires a guide for your `model_slug` + `type` pair — call the `/price` sibling first, which runs the same check for free and quotes the fee.",
                "operationId": "clientBoostPromptV2",
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "properties": {
                                    "prompt": {
                                        "type": "string",
                                        "example": "A beautiful landscape with mountains",
                                        "minLength": 3
                                    },
                                    "negative_prompt": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "example": "blurry, low quality",
                                        "minLength": 3
                                    },
                                    "type": {
                                        "description": "Inference type, v2 dot notation. Only prompt-driven types are boostable.",
                                        "type": "string",
                                        "example": "images.generations",
                                        "enum": [
                                            "images.generations",
                                            "images.edits",
                                            "videos.generations",
                                            "videos.animations",
                                            "audio.speech",
                                            "audio.music"
                                        ]
                                    },
                                    "model_slug": {
                                        "type": "string",
                                        "example": "Flux1schnell"
                                    },
                                    "image": {
                                        "description": "Reference image. Required for images.edits/videos.animations. Supported formats: JPEG, PNG, BMP, GIF, WebP.",
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "format": "binary"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Enhanced prompts returned successfully",
                        "headers": {
                            "X-RateLimit-Policy": {
                                "$ref": "#/components/headers/X-RateLimit-Policy"
                            },
                            "X-RateLimit-Source": {
                                "$ref": "#/components/headers/X-RateLimit-Source"
                            },
                            "X-RateLimit-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Limit"
                            },
                            "X-RateLimit-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Remaining"
                            },
                            "X-RateLimit-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Reset"
                            },
                            "X-RateLimit-Daily-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Limit"
                            },
                            "X-RateLimit-Daily-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Remaining"
                            },
                            "X-RateLimit-Daily-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Reset"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "prompt": {
                                            "type": "string"
                                        },
                                        "negative_prompt": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationError",
                        "description": "Validation failed, insufficient balance, no guide available, or the model is not available on your plan. In the last case the error is reported on the \"model_slug\" field (not \"model\") with the message \"This model is not available on your plan. Please upgrade to access it.\" — you cannot boost a prompt for a model you are not able to generate with. Such a model is also omitted from GET /models."
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimitExceeded"
                    },
                    "403": {
                        "$ref": "#/components/responses/AccountSuspended"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/prompts/enhancements/price": {
            "post": {
                "tags": [
                    "Client API v2"
                ],
                "summary": "Estimate prompt enhancement price",
                "description": "Price of a prompt boost, and a free check that one is possible: it runs the same guide lookup as the boost itself, so a 422 here means the boost would also be rejected. Charges nothing either way. NOTE the response shape differs from every other price endpoint: this one returns `{\"price\": …}` at the top level, not wrapped in `data`.",
                "operationId": "clientCalculateBoostPriceV2",
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "properties": {
                                    "prompt": {
                                        "type": "string",
                                        "example": "A beautiful landscape",
                                        "minLength": 3
                                    },
                                    "negative_prompt": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "example": "blurry, low quality",
                                        "minLength": 3
                                    },
                                    "type": {
                                        "description": "Inference type, v2 dot notation. Only prompt-driven types are boostable.",
                                        "type": "string",
                                        "example": "images.generations",
                                        "enum": [
                                            "images.generations",
                                            "images.edits",
                                            "videos.generations",
                                            "videos.animations",
                                            "audio.speech",
                                            "audio.music"
                                        ]
                                    },
                                    "model_slug": {
                                        "type": "string",
                                        "example": "Flux1schnell"
                                    },
                                    "image": {
                                        "description": "Reference image (for price estimation of image-based types).",
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "format": "binary"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Price calculation returned successfully",
                        "headers": {
                            "X-RateLimit-Policy": {
                                "$ref": "#/components/headers/X-RateLimit-Policy"
                            },
                            "X-RateLimit-Source": {
                                "$ref": "#/components/headers/X-RateLimit-Source"
                            },
                            "X-RateLimit-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Limit"
                            },
                            "X-RateLimit-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Remaining"
                            },
                            "X-RateLimit-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Reset"
                            },
                            "X-RateLimit-Daily-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Limit"
                            },
                            "X-RateLimit-Daily-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Remaining"
                            },
                            "X-RateLimit-Daily-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Reset"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "price": {
                                            "type": "number",
                                            "format": "float",
                                            "example": 0.00012345
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationError",
                        "description": "Validation failed, or the model is not available on your plan. In the last case the error is reported on the \"model_slug\" field (not \"model\") with the message \"This model is not available on your plan. Please upgrade to access it.\""
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimitExceeded"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/key/usage": {
            "get": {
                "tags": [
                    "Client API v2"
                ],
                "summary": "Usage of the calling API key",
                "description": "Cost, requests and errors of the key sending the request. Works with any key role.",
                "operationId": "getCurrentApiKeyUsage",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptHeader"
                    },
                    {
                        "$ref": "#/components/parameters/UsageFrom"
                    },
                    {
                        "$ref": "#/components/parameters/UsageTo"
                    },
                    {
                        "name": "group_by",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "default": "day",
                            "enum": [
                                "day",
                                "hour",
                                "type",
                                "model"
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The report.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/UsageReport"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing, unknown, expired or deactivated key — `code` says which: `missing_key`, `invalid_key`, `key_expired` or `key_revoked`.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/InsufficientPermissions"
                    },
                    "422": {
                        "description": "Invalid range or group_by.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimitExceeded"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/keys/{id}/usage": {
            "get": {
                "tags": [
                    "Client API v2"
                ],
                "summary": "Usage of an API key",
                "description": "Like `GET /api/v2/key/usage`, for any key of the account. Needs an ADMIN key.",
                "operationId": "getApiKeyUsage",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptHeader"
                    },
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "$ref": "#/components/parameters/UsageFrom"
                    },
                    {
                        "$ref": "#/components/parameters/UsageTo"
                    },
                    {
                        "name": "group_by",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "default": "day",
                            "enum": [
                                "day",
                                "hour",
                                "type",
                                "model"
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The report.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/UsageReport"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing, unknown, expired or deactivated key — `code` says which: `missing_key`, `invalid_key`, `key_expired` or `key_revoked`.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/InsufficientPermissions"
                    },
                    "404": {
                        "description": "No such key on this account.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Invalid range or group_by.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimitExceeded"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/account/usage": {
            "get": {
                "tags": [
                    "Client API v2"
                ],
                "summary": "Usage of the whole account",
                "description": "Cost, requests and errors of every key of the account, optionally per key. The same data as the Usage screen in the Dashboard. Needs an ADMIN key.",
                "operationId": "getAccountUsage",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptHeader"
                    },
                    {
                        "$ref": "#/components/parameters/UsageFrom"
                    },
                    {
                        "$ref": "#/components/parameters/UsageTo"
                    },
                    {
                        "name": "group_by",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "default": "day",
                            "enum": [
                                "day",
                                "hour",
                                "type",
                                "model",
                                "key"
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The report.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/UsageReport"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing, unknown, expired or deactivated key — `code` says which: `missing_key`, `invalid_key`, `key_expired` or `key_revoked`.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/InsufficientPermissions"
                    },
                    "422": {
                        "description": "Invalid range or group_by.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimitExceeded"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/videos/audio-syncs": {
            "post": {
                "tags": [
                    "Client API v2"
                ],
                "summary": "Generate a video conditioned on an audio track",
                "description": "Generate a video conditioned on an audio track.",
                "operationId": "syncVideoAudio",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptHeader"
                    }
                ],
                "requestBody": {
                    "description": "Audio to video generation parameters",
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "$ref": "#/components/schemas/Aud2VideoRequestBody"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "ID of the inference request.",
                        "headers": {
                            "X-RateLimit-Policy": {
                                "$ref": "#/components/headers/X-RateLimit-Policy"
                            },
                            "X-RateLimit-Source": {
                                "$ref": "#/components/headers/X-RateLimit-Source"
                            },
                            "X-RateLimit-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Limit"
                            },
                            "X-RateLimit-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Remaining"
                            },
                            "X-RateLimit-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Reset"
                            },
                            "X-RateLimit-Daily-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Limit"
                            },
                            "X-RateLimit-Daily-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Remaining"
                            },
                            "X-RateLimit-Daily-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Reset"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/JobRequestResponseResource"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized user.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationError"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimitExceeded"
                    },
                    "403": {
                        "$ref": "#/components/responses/AccountSuspended"
                    },
                    "402": {
                        "$ref": "#/components/responses/KeyLimitExceeded"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/videos/audio-syncs/price": {
            "post": {
                "tags": [
                    "Client API v2"
                ],
                "summary": "Estimate the price of an audio-to-video sync request",
                "description": "Estimate the price of an audio-to-video sync request.",
                "operationId": "estimateVideoAudioSyncPrice",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptHeader"
                    }
                ],
                "requestBody": {
                    "description": "Audio to video price calculation parameters",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/Aud2VideoPriceRequestBody"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Calculated price for audio2video inference.",
                        "headers": {
                            "X-RateLimit-Policy": {
                                "$ref": "#/components/headers/X-RateLimit-Policy"
                            },
                            "X-RateLimit-Source": {
                                "$ref": "#/components/headers/X-RateLimit-Source"
                            },
                            "X-RateLimit-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Limit"
                            },
                            "X-RateLimit-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Remaining"
                            },
                            "X-RateLimit-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Reset"
                            },
                            "X-RateLimit-Daily-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Limit"
                            },
                            "X-RateLimit-Daily-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Remaining"
                            },
                            "X-RateLimit-Daily-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Reset"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "properties": {
                                                "price": {
                                                    "description": "What this request would cost, in the same credit unit as the account balance. A quote only — nothing is charged by this endpoint.",
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 0.15
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized user.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationError"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimitExceeded"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/images/edits/price": {
            "post": {
                "tags": [
                    "Client API v2"
                ],
                "summary": "Estimate the price of an image edit request",
                "description": "Estimate the price of an image edit request.",
                "operationId": "estimateImageEditPrice",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptHeader"
                    }
                ],
                "requestBody": {
                    "description": "Image generation parameters",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/Img2ImgPriceRequestBody"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Calculated price for img2img inference.",
                        "headers": {
                            "X-RateLimit-Policy": {
                                "$ref": "#/components/headers/X-RateLimit-Policy"
                            },
                            "X-RateLimit-Source": {
                                "$ref": "#/components/headers/X-RateLimit-Source"
                            },
                            "X-RateLimit-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Limit"
                            },
                            "X-RateLimit-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Remaining"
                            },
                            "X-RateLimit-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Reset"
                            },
                            "X-RateLimit-Daily-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Limit"
                            },
                            "X-RateLimit-Daily-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Remaining"
                            },
                            "X-RateLimit-Daily-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Reset"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "properties": {
                                                "price": {
                                                    "description": "What this request would cost, in the same credit unit as the account balance. A quote only — nothing is charged by this endpoint.",
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 0.25
                                                },
                                                "is_estimated": {
                                                    "description": "True when the price is an ESTIMATE rather than an exact quote. Partner (external-provider) models are billed by the provider after the inference, so the final charge is not knowable up front.",
                                                    "type": "boolean",
                                                    "example": false
                                                },
                                                "estimate_basis": {
                                                    "description": "What the estimate is derived from. `request_params` - observed costs of requests with these exact parameters; `price_matrix` - the model's price table for these parameters (resolution, duration, …); `model_history` - observed costs of recent requests to this model; `model_default` - the model's configured fallback, used while it has no history; `unavailable` - no cost data at all, so `price` is 0.0 and must not be relied on. Null when the price is exact rather than estimated, which is the case for every native (non-partner) model.",
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "example": "request_params",
                                                    "enum": [
                                                        "request_params",
                                                        "price_matrix",
                                                        "model_history",
                                                        "model_default",
                                                        "unavailable",
                                                        null
                                                    ]
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized user.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationError"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimitExceeded"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/images/ocr/price": {
            "post": {
                "tags": [
                    "Client API v2"
                ],
                "summary": "Estimate the price of an image OCR request",
                "description": "Estimate the price of an image OCR request.",
                "operationId": "estimateImageOcrPrice",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptHeader"
                    }
                ],
                "requestBody": {
                    "description": "Image to text conversion parameters",
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "$ref": "#/components/schemas/Img2TxtPriceRequestBody"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Calculated price for img2txt inference.",
                        "headers": {
                            "X-RateLimit-Policy": {
                                "$ref": "#/components/headers/X-RateLimit-Policy"
                            },
                            "X-RateLimit-Source": {
                                "$ref": "#/components/headers/X-RateLimit-Source"
                            },
                            "X-RateLimit-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Limit"
                            },
                            "X-RateLimit-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Remaining"
                            },
                            "X-RateLimit-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Reset"
                            },
                            "X-RateLimit-Daily-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Limit"
                            },
                            "X-RateLimit-Daily-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Remaining"
                            },
                            "X-RateLimit-Daily-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Reset"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "properties": {
                                                "price": {
                                                    "description": "What this request would cost, in the same credit unit as the account balance. A quote only — nothing is charged by this endpoint.",
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 0.15
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized user.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationError"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimitExceeded"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/videos/animations/price": {
            "post": {
                "tags": [
                    "Client API v2"
                ],
                "summary": "Estimate the price of an image-to-video animation request",
                "description": "Estimate the price of an image-to-video animation request.",
                "operationId": "estimateVideoAnimationPrice",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptHeader"
                    }
                ],
                "requestBody": {
                    "description": "Image to video price calculation parameters",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/Img2VideoPriceRequestBody"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Calculated price for img2video inference.",
                        "headers": {
                            "X-RateLimit-Policy": {
                                "$ref": "#/components/headers/X-RateLimit-Policy"
                            },
                            "X-RateLimit-Source": {
                                "$ref": "#/components/headers/X-RateLimit-Source"
                            },
                            "X-RateLimit-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Limit"
                            },
                            "X-RateLimit-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Remaining"
                            },
                            "X-RateLimit-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Reset"
                            },
                            "X-RateLimit-Daily-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Limit"
                            },
                            "X-RateLimit-Daily-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Remaining"
                            },
                            "X-RateLimit-Daily-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Reset"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "properties": {
                                                "price": {
                                                    "description": "What this request would cost, in the same credit unit as the account balance. A quote only — nothing is charged by this endpoint.",
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 0.15
                                                },
                                                "is_estimated": {
                                                    "description": "True when the price is an ESTIMATE rather than an exact quote. Partner (external-provider) models are billed by the provider after the inference, so the final charge is not knowable up front.",
                                                    "type": "boolean",
                                                    "example": false
                                                },
                                                "estimate_basis": {
                                                    "description": "What the estimate is derived from. `request_params` - observed costs of requests with these exact parameters; `price_matrix` - the model's price table for these parameters (resolution, duration, …); `model_history` - observed costs of recent requests to this model; `model_default` - the model's configured fallback, used while it has no history; `unavailable` - no cost data at all, so `price` is 0.0 and must not be relied on. Null when the price is exact rather than estimated, which is the case for every native (non-partner) model.",
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "example": "request_params",
                                                    "enum": [
                                                        "request_params",
                                                        "price_matrix",
                                                        "model_history",
                                                        "model_default",
                                                        "unavailable",
                                                        null
                                                    ]
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized user.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationError"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimitExceeded"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/images/background-removals/price": {
            "post": {
                "tags": [
                    "Client API v2"
                ],
                "summary": "Estimate the price of an image background removal request",
                "description": "Estimate the price of an image background removal request.",
                "operationId": "estimateImageBackgroundRemovalPrice",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptHeader"
                    }
                ],
                "requestBody": {
                    "description": "Image background removal parameters",
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "$ref": "#/components/schemas/ImageRemoveBgPriceRequestBody"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Calculated price for image background removal inference.",
                        "headers": {
                            "X-RateLimit-Policy": {
                                "$ref": "#/components/headers/X-RateLimit-Policy"
                            },
                            "X-RateLimit-Source": {
                                "$ref": "#/components/headers/X-RateLimit-Source"
                            },
                            "X-RateLimit-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Limit"
                            },
                            "X-RateLimit-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Remaining"
                            },
                            "X-RateLimit-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Reset"
                            },
                            "X-RateLimit-Daily-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Limit"
                            },
                            "X-RateLimit-Daily-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Remaining"
                            },
                            "X-RateLimit-Daily-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Reset"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "properties": {
                                                "price": {
                                                    "description": "What this request would cost, in the same credit unit as the account balance. A quote only — nothing is charged by this endpoint.",
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 0.15
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized user.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationError"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimitExceeded"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/images/upscales/price": {
            "post": {
                "tags": [
                    "Client API v2"
                ],
                "summary": "Estimate the price of an image upscale request",
                "description": "Estimate the price of an image upscale request.",
                "operationId": "estimateImageUpscalePrice",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptHeader"
                    }
                ],
                "requestBody": {
                    "description": "Image upscaling parameters",
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "$ref": "#/components/schemas/ImageUpscalePriceRequestBody"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Calculated price for image upscaling inference.",
                        "headers": {
                            "X-RateLimit-Policy": {
                                "$ref": "#/components/headers/X-RateLimit-Policy"
                            },
                            "X-RateLimit-Source": {
                                "$ref": "#/components/headers/X-RateLimit-Source"
                            },
                            "X-RateLimit-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Limit"
                            },
                            "X-RateLimit-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Remaining"
                            },
                            "X-RateLimit-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Reset"
                            },
                            "X-RateLimit-Daily-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Limit"
                            },
                            "X-RateLimit-Daily-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Remaining"
                            },
                            "X-RateLimit-Daily-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Reset"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "properties": {
                                                "price": {
                                                    "description": "What this request would cost, in the same credit unit as the account balance. A quote only — nothing is charged by this endpoint.",
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 0.15
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized user.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationError"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimitExceeded"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/images/generations/price": {
            "post": {
                "tags": [
                    "Client API v2"
                ],
                "summary": "Estimate the price of a text-to-image generation request",
                "description": "Estimate the price of a text-to-image generation request.",
                "operationId": "estimateImagePrice",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptHeader"
                    }
                ],
                "requestBody": {
                    "description": "Image generation parameters",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/Txt2ImgPriceRequestBody"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Calculated price for text2img inference.",
                        "headers": {
                            "X-RateLimit-Policy": {
                                "$ref": "#/components/headers/X-RateLimit-Policy"
                            },
                            "X-RateLimit-Source": {
                                "$ref": "#/components/headers/X-RateLimit-Source"
                            },
                            "X-RateLimit-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Limit"
                            },
                            "X-RateLimit-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Remaining"
                            },
                            "X-RateLimit-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Reset"
                            },
                            "X-RateLimit-Daily-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Limit"
                            },
                            "X-RateLimit-Daily-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Remaining"
                            },
                            "X-RateLimit-Daily-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Reset"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "properties": {
                                                "price": {
                                                    "description": "What this request would cost, in the same credit unit as the account balance. A quote only — nothing is charged by this endpoint.",
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 0.25
                                                },
                                                "is_estimated": {
                                                    "description": "True when the price is an ESTIMATE rather than an exact quote. Partner (external-provider) models are billed by the provider after the inference, so the final charge is not knowable up front.",
                                                    "type": "boolean",
                                                    "example": false
                                                },
                                                "estimate_basis": {
                                                    "description": "What the estimate is derived from. `request_params` - observed costs of requests with these exact parameters; `price_matrix` - the model's price table for these parameters (resolution, duration, …); `model_history` - observed costs of recent requests to this model; `model_default` - the model's configured fallback, used while it has no history; `unavailable` - no cost data at all, so `price` is 0.0 and must not be relied on. Null when the price is exact rather than estimated, which is the case for every native (non-partner) model.",
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "example": "request_params",
                                                    "enum": [
                                                        "request_params",
                                                        "price_matrix",
                                                        "model_history",
                                                        "model_default",
                                                        "unavailable",
                                                        null
                                                    ]
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized user.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationError"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimitExceeded"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/audio/speech/price": {
            "post": {
                "tags": [
                    "Client API v2"
                ],
                "summary": "Estimate the price of a text-to-speech generation request",
                "description": "Estimate the price of a text-to-speech generation request. Either text or count_text must be provided.",
                "operationId": "estimateSpeechPrice",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptHeader"
                    }
                ],
                "requestBody": {
                    "description": "Audio generation parameters. Either text or count_text must be provided. Voice is optional (not needed for voice_clone or voice_design modes).",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/Txt2AudioPriceRequestBody"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Calculated price for text2audio inference.",
                        "headers": {
                            "X-RateLimit-Policy": {
                                "$ref": "#/components/headers/X-RateLimit-Policy"
                            },
                            "X-RateLimit-Source": {
                                "$ref": "#/components/headers/X-RateLimit-Source"
                            },
                            "X-RateLimit-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Limit"
                            },
                            "X-RateLimit-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Remaining"
                            },
                            "X-RateLimit-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Reset"
                            },
                            "X-RateLimit-Daily-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Limit"
                            },
                            "X-RateLimit-Daily-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Remaining"
                            },
                            "X-RateLimit-Daily-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Reset"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "properties": {
                                                "price": {
                                                    "description": "What this request would cost, in the same credit unit as the account balance. A quote only — nothing is charged by this endpoint.",
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 0.25
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized user.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationError"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimitExceeded"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/embeddings/price": {
            "post": {
                "tags": [
                    "Client API v2"
                ],
                "summary": "Estimate the price of an embedding request",
                "description": "Estimate the price of an embedding request.",
                "operationId": "estimateEmbeddingPrice",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptHeader"
                    }
                ],
                "requestBody": {
                    "description": "Text to embedding conversion parameters",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/Txt2EmbeddingPriceRequestBody"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Calculated price for txt2embedding inference.",
                        "headers": {
                            "X-RateLimit-Policy": {
                                "$ref": "#/components/headers/X-RateLimit-Policy"
                            },
                            "X-RateLimit-Source": {
                                "$ref": "#/components/headers/X-RateLimit-Source"
                            },
                            "X-RateLimit-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Limit"
                            },
                            "X-RateLimit-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Remaining"
                            },
                            "X-RateLimit-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Reset"
                            },
                            "X-RateLimit-Daily-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Limit"
                            },
                            "X-RateLimit-Daily-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Remaining"
                            },
                            "X-RateLimit-Daily-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Reset"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "properties": {
                                                "price": {
                                                    "description": "What this request would cost, in the same credit unit as the account balance. A quote only — nothing is charged by this endpoint.",
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 0.0003
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized user.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationError"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimitExceeded"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/web/search": {
            "post": {
                "tags": [
                    "Client API v2"
                ],
                "summary": "Search the web",
                "description": "Search the live web and get ranked results — optionally with each page's text, the most relevant excerpts and an AI-written summary — in a single synchronous call. The response is returned directly: there is no `request_id` to poll, no webhook and no job status. The amount charged is returned in `cost`.",
                "operationId": "webSearch",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptHeader"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/WebSearchRequestBody"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Search results.",
                        "headers": {
                            "X-RateLimit-Policy": {
                                "$ref": "#/components/headers/X-RateLimit-Policy"
                            },
                            "X-RateLimit-Source": {
                                "$ref": "#/components/headers/X-RateLimit-Source"
                            },
                            "X-RateLimit-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Limit"
                            },
                            "X-RateLimit-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Remaining"
                            },
                            "X-RateLimit-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Reset"
                            },
                            "X-RateLimit-Daily-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Limit"
                            },
                            "X-RateLimit-Daily-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Remaining"
                            },
                            "X-RateLimit-Daily-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Reset"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/WebSearchResponse"
                                },
                                "examples": {
                                    "quick": {
                                        "summary": "Quick search",
                                        "value": {
                                            "request_id": "ba1e1b58-a12c-4f83-9ec7-572e301fa1c2",
                                            "cost": 0.0048,
                                            "results": [
                                                {
                                                    "url": "https://huggingface.co/models?pipeline_tag=text-to-image",
                                                    "title": "Text-to-Image Models – Hugging Face"
                                                },
                                                {
                                                    "url": "https://fluence.ai/blog/best-open-source-text-to-image-models/",
                                                    "title": "12 Best Open Source Image Generation Models (in 2026)",
                                                    "published_at": "2026-10-20T08:48:00+00:00",
                                                    "author": "Fluence"
                                                }
                                            ]
                                        }
                                    },
                                    "with_content": {
                                        "summary": "Balanced search with text, excerpts and summary",
                                        "value": {
                                            "request_id": "dc260284-883c-44be-b61b-ef82a3486a50",
                                            "cost": 0.012,
                                            "results": [
                                                {
                                                    "url": "https://bfl.ai/blog/flux-2",
                                                    "title": "FLUX.2: Frontier Visual Intelligence | Black Forest Labs",
                                                    "published_at": "2025-11-25T15:11:07+00:00",
                                                    "image": "https://bfl.ai/api/og/blog/flux-2",
                                                    "text": "FLUX.2: Frontier Visual Intelligence | Black Forest Labs\n\n# FLUX.2: Frontier Visual Intelligence\n\nNovember 25, 2025 5 min read ...",
                                                    "excerpts": [
                                                        "# FLUX.2: Frontier Visual Intelligence\n\nFLUX.2 is designed for real-world creative workflows ..."
                                                    ],
                                                    "summary": "FLUX.2 introduces several major enhancements for real-world creative workflows: multi-reference support ..."
                                                }
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing, unknown, expired or deactivated key — `code` says which: `missing_key`, `invalid_key`, `key_expired` or `key_revoked`.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationError"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimitExceeded"
                    },
                    "402": {
                        "$ref": "#/components/responses/KeyLimitExceeded"
                    },
                    "403": {
                        "$ref": "#/components/responses/AccountSuspended"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/web/search/price": {
            "post": {
                "tags": [
                    "Client API v2"
                ],
                "summary": "Estimate the price of a web search",
                "description": "Estimate what a web search would cost. Accepts the same body as `POST /api/v2/web/search` and validates it the same way. Nothing is charged.",
                "operationId": "estimateWebSearchPrice",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptHeader"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/WebSearchRequestBody"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Calculated price.",
                        "headers": {
                            "X-RateLimit-Policy": {
                                "$ref": "#/components/headers/X-RateLimit-Policy"
                            },
                            "X-RateLimit-Source": {
                                "$ref": "#/components/headers/X-RateLimit-Source"
                            },
                            "X-RateLimit-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Limit"
                            },
                            "X-RateLimit-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Remaining"
                            },
                            "X-RateLimit-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Reset"
                            },
                            "X-RateLimit-Daily-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Limit"
                            },
                            "X-RateLimit-Daily-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Remaining"
                            },
                            "X-RateLimit-Daily-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Reset"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/WebPriceResponse"
                                },
                                "examples": {
                                    "quick": {
                                        "summary": "Quick search, up to 10 results",
                                        "value": {
                                            "price": 0.0048
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing, unknown, expired or deactivated key — `code` says which: `missing_key`, `invalid_key`, `key_expired` or `key_revoked`.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationError"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimitExceeded"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/web/contents": {
            "post": {
                "tags": [
                    "Client API v2"
                ],
                "summary": "Read web pages",
                "description": "Fetch up to 20 URLs and get clean page text, the most relevant excerpts and/or an AI-written summary of each — in a single synchronous call. Request at least one of `text`, `excerpts` or `summary`. Each page reports its own `status`; pages that could not be read are not charged. The response is returned directly — there is no job to poll.",
                "operationId": "webContents",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptHeader"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/WebContentsRequestBody"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Page contents, one entry per requested URL.",
                        "headers": {
                            "X-RateLimit-Policy": {
                                "$ref": "#/components/headers/X-RateLimit-Policy"
                            },
                            "X-RateLimit-Source": {
                                "$ref": "#/components/headers/X-RateLimit-Source"
                            },
                            "X-RateLimit-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Limit"
                            },
                            "X-RateLimit-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Remaining"
                            },
                            "X-RateLimit-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Reset"
                            },
                            "X-RateLimit-Daily-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Limit"
                            },
                            "X-RateLimit-Daily-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Remaining"
                            },
                            "X-RateLimit-Daily-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Reset"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/WebContentsResponse"
                                },
                                "examples": {
                                    "mixed": {
                                        "summary": "One page read, one not found, one unreachable",
                                        "value": {
                                            "request_id": "72e1b519-fefb-4fc0-8f43-126d73f776cb",
                                            "cost": 0.0012,
                                            "results": [
                                                {
                                                    "url": "https://example.com",
                                                    "status": "ok",
                                                    "title": "Example Domain",
                                                    "text": "Example Domain\n\nThis domain is for use in documentation examples ..."
                                                },
                                                {
                                                    "url": "https://deapi.ai/nonexistent-page",
                                                    "status": "not_found"
                                                },
                                                {
                                                    "url": "https://unreachable.example/page",
                                                    "status": "unknown"
                                                }
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing, unknown, expired or deactivated key — `code` says which: `missing_key`, `invalid_key`, `key_expired` or `key_revoked`.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationError"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimitExceeded"
                    },
                    "402": {
                        "$ref": "#/components/responses/KeyLimitExceeded"
                    },
                    "403": {
                        "$ref": "#/components/responses/AccountSuspended"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/web/contents/price": {
            "post": {
                "tags": [
                    "Client API v2"
                ],
                "summary": "Estimate the price of reading web pages",
                "description": "Estimate what a web contents request would cost, assuming every URL can be read. Accepts the same body as `POST /api/v2/web/contents` and validates it the same way. Nothing is charged.",
                "operationId": "estimateWebContentsPrice",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptHeader"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/WebContentsRequestBody"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Calculated price.",
                        "headers": {
                            "X-RateLimit-Policy": {
                                "$ref": "#/components/headers/X-RateLimit-Policy"
                            },
                            "X-RateLimit-Source": {
                                "$ref": "#/components/headers/X-RateLimit-Source"
                            },
                            "X-RateLimit-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Limit"
                            },
                            "X-RateLimit-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Remaining"
                            },
                            "X-RateLimit-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Reset"
                            },
                            "X-RateLimit-Daily-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Limit"
                            },
                            "X-RateLimit-Daily-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Remaining"
                            },
                            "X-RateLimit-Daily-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Reset"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/WebPriceResponse"
                                },
                                "examples": {
                                    "text": {
                                        "summary": "One URL, text only",
                                        "value": {
                                            "price": 0.0012
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing, unknown, expired or deactivated key — `code` says which: `missing_key`, `invalid_key`, `key_expired` or `key_revoked`.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationError"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimitExceeded"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/videos/generations/price": {
            "post": {
                "tags": [
                    "Client API v2"
                ],
                "summary": "Estimate the price of a text-to-video generation request",
                "description": "Estimate the price of a text-to-video generation request.",
                "operationId": "estimateVideoPrice",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptHeader"
                    }
                ],
                "requestBody": {
                    "description": "Text to video conversion parameters",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/Txt2VideoPriceRequestBody"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Calculated price for txt2video inference.",
                        "headers": {
                            "X-RateLimit-Policy": {
                                "$ref": "#/components/headers/X-RateLimit-Policy"
                            },
                            "X-RateLimit-Source": {
                                "$ref": "#/components/headers/X-RateLimit-Source"
                            },
                            "X-RateLimit-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Limit"
                            },
                            "X-RateLimit-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Remaining"
                            },
                            "X-RateLimit-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Reset"
                            },
                            "X-RateLimit-Daily-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Limit"
                            },
                            "X-RateLimit-Daily-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Remaining"
                            },
                            "X-RateLimit-Daily-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Reset"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "properties": {
                                                "price": {
                                                    "description": "What this request would cost, in the same credit unit as the account balance. A quote only — nothing is charged by this endpoint.",
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 0.15
                                                },
                                                "is_estimated": {
                                                    "description": "True when the price is an ESTIMATE rather than an exact quote. Partner (external-provider) models are billed by the provider after the inference, so the final charge is not knowable up front.",
                                                    "type": "boolean",
                                                    "example": false
                                                },
                                                "estimate_basis": {
                                                    "description": "What the estimate is derived from. `request_params` - observed costs of requests with these exact parameters; `price_matrix` - the model's price table for these parameters (resolution, duration, …); `model_history` - observed costs of recent requests to this model; `model_default` - the model's configured fallback, used while it has no history; `unavailable` - no cost data at all, so `price` is 0.0 and must not be relied on. Null when the price is exact rather than estimated, which is the case for every native (non-partner) model.",
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "example": "request_params",
                                                    "enum": [
                                                        "request_params",
                                                        "price_matrix",
                                                        "model_history",
                                                        "model_default",
                                                        "unavailable",
                                                        null
                                                    ]
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized user.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationError"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimitExceeded"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/audio/transcriptions/price": {
            "post": {
                "tags": [
                    "Client API v2"
                ],
                "summary": "Estimate the price of a transcription request",
                "description": "Estimate the price of a transcription request. Provide one of: source_url, source_file, or duration_seconds.",
                "operationId": "estimateTranscriptionPrice",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptHeader"
                    }
                ],
                "requestBody": {
                    "description": "Transcription price calculation parameters",
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "$ref": "#/components/schemas/TranscribePriceRequestBody"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Calculated price for transcription.",
                        "headers": {
                            "X-RateLimit-Policy": {
                                "$ref": "#/components/headers/X-RateLimit-Policy"
                            },
                            "X-RateLimit-Source": {
                                "$ref": "#/components/headers/X-RateLimit-Source"
                            },
                            "X-RateLimit-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Limit"
                            },
                            "X-RateLimit-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Remaining"
                            },
                            "X-RateLimit-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Reset"
                            },
                            "X-RateLimit-Daily-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Limit"
                            },
                            "X-RateLimit-Daily-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Remaining"
                            },
                            "X-RateLimit-Daily-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Reset"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "properties": {
                                                "price": {
                                                    "description": "Calculated price for the transcription",
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 0.25
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized user.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationError"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimitExceeded"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/audio/music/price": {
            "post": {
                "tags": [
                    "Client API v2"
                ],
                "summary": "Estimate the price of a text-to-music generation request",
                "description": "Estimate the price of a text-to-music generation request. Requires duration and inference_steps parameters.",
                "operationId": "estimateMusicPrice",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptHeader"
                    }
                ],
                "requestBody": {
                    "description": "Music generation parameters for price calculation.",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/Txt2MusicPriceRequestBody"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Calculated price for text2music inference.",
                        "headers": {
                            "X-RateLimit-Policy": {
                                "$ref": "#/components/headers/X-RateLimit-Policy"
                            },
                            "X-RateLimit-Source": {
                                "$ref": "#/components/headers/X-RateLimit-Source"
                            },
                            "X-RateLimit-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Limit"
                            },
                            "X-RateLimit-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Remaining"
                            },
                            "X-RateLimit-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Reset"
                            },
                            "X-RateLimit-Daily-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Limit"
                            },
                            "X-RateLimit-Daily-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Remaining"
                            },
                            "X-RateLimit-Daily-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Reset"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "properties": {
                                                "price": {
                                                    "description": "What this request would cost, in the same credit unit as the account balance. A quote only — nothing is charged by this endpoint.",
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 0.25
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized user.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Model not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationError"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimitExceeded"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/videos/descriptions/price": {
            "post": {
                "tags": [
                    "Client API v2"
                ],
                "summary": "Estimate the price of a video description",
                "description": "Quote a video description before submitting it. Priced on the machine time the description takes — which grows with the length of the video and with the `preset` — at the model's hourly rate, except on TikTok, where the price is a fixed card by length (up to 1, 2, 3, 5 or 10 minutes; 10 minutes is the maximum) scaled ×0.75 / ×1 / ×1.5 by the `preset`. `include_metadata` adds the same flat surcharge as on transcription, on URL sources only. Provide the source as a URL, an upload, or a known `duration_seconds`.",
                "operationId": "estimateVideoDescriptionPrice",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptHeader"
                    }
                ],
                "requestBody": {
                    "description": "Provide exactly one of video_url, video_file or duration_seconds.",
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "$ref": "#/components/schemas/VideoDescriptionPriceRequestBody"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Calculated price for the video description.",
                        "headers": {
                            "X-RateLimit-Policy": {
                                "$ref": "#/components/headers/X-RateLimit-Policy"
                            },
                            "X-RateLimit-Source": {
                                "$ref": "#/components/headers/X-RateLimit-Source"
                            },
                            "X-RateLimit-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Limit"
                            },
                            "X-RateLimit-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Remaining"
                            },
                            "X-RateLimit-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Reset"
                            },
                            "X-RateLimit-Daily-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Limit"
                            },
                            "X-RateLimit-Daily-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Remaining"
                            },
                            "X-RateLimit-Daily-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Reset"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "properties": {
                                                "price": {
                                                    "description": "Calculated price",
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 0.25
                                                },
                                                "duration_seconds": {
                                                    "description": "Length of the video the price was calculated for, in seconds: read from the video_url or the video_file, or the duration_seconds sent.",
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 100
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized user.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationError"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimitExceeded"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/videos/background-removals/price": {
            "post": {
                "tags": [
                    "Client API v2"
                ],
                "summary": "Estimate the price of a video background removal request",
                "description": "Estimate the price of a video background removal request.",
                "operationId": "estimateVideoBackgroundRemovalPrice",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptHeader"
                    }
                ],
                "requestBody": {
                    "description": "Video background removal parameters",
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "$ref": "#/components/schemas/VideoRemoveBgPriceRequestBody"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Calculated price for video background removal inference.",
                        "headers": {
                            "X-RateLimit-Policy": {
                                "$ref": "#/components/headers/X-RateLimit-Policy"
                            },
                            "X-RateLimit-Source": {
                                "$ref": "#/components/headers/X-RateLimit-Source"
                            },
                            "X-RateLimit-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Limit"
                            },
                            "X-RateLimit-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Remaining"
                            },
                            "X-RateLimit-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Reset"
                            },
                            "X-RateLimit-Daily-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Limit"
                            },
                            "X-RateLimit-Daily-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Remaining"
                            },
                            "X-RateLimit-Daily-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Reset"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "properties": {
                                                "price": {
                                                    "description": "What this request would cost, in the same credit unit as the account balance. A quote only — nothing is charged by this endpoint.",
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 0.25
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized user.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationError"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimitExceeded"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/videos/upscales/price": {
            "post": {
                "tags": [
                    "Client API v2"
                ],
                "summary": "Estimate the price of a video upscale request",
                "description": "Estimate the price of a video upscale request.",
                "operationId": "estimateVideoUpscalePrice",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptHeader"
                    }
                ],
                "requestBody": {
                    "description": "Video upscaling parameters",
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "$ref": "#/components/schemas/VideoUpscalePriceRequestBody"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Calculated price for video upscaling inference.",
                        "headers": {
                            "X-RateLimit-Policy": {
                                "$ref": "#/components/headers/X-RateLimit-Policy"
                            },
                            "X-RateLimit-Source": {
                                "$ref": "#/components/headers/X-RateLimit-Source"
                            },
                            "X-RateLimit-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Limit"
                            },
                            "X-RateLimit-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Remaining"
                            },
                            "X-RateLimit-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Reset"
                            },
                            "X-RateLimit-Daily-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Limit"
                            },
                            "X-RateLimit-Daily-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Remaining"
                            },
                            "X-RateLimit-Daily-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Reset"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "properties": {
                                                "price": {
                                                    "description": "What this request would cost, in the same credit unit as the account balance. A quote only — nothing is charged by this endpoint.",
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 0.25
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized user.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationError"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimitExceeded"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/images/edits": {
            "post": {
                "tags": [
                    "Client API v2"
                ],
                "summary": "Edit an image guided by a text prompt",
                "description": "Edit an image guided by a text prompt. Accepts either a single image via \"image\" or multiple images via \"images[]\" (mutually exclusive).",
                "operationId": "editImage",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptHeader"
                    }
                ],
                "requestBody": {
                    "description": "Image generation parameters. Either \"image\" or \"images[]\" must be provided (not both).",
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "$ref": "#/components/schemas/Img2ImgRequestBody"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "ID of the inference request.",
                        "headers": {
                            "X-RateLimit-Policy": {
                                "$ref": "#/components/headers/X-RateLimit-Policy"
                            },
                            "X-RateLimit-Source": {
                                "$ref": "#/components/headers/X-RateLimit-Source"
                            },
                            "X-RateLimit-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Limit"
                            },
                            "X-RateLimit-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Remaining"
                            },
                            "X-RateLimit-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Reset"
                            },
                            "X-RateLimit-Daily-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Limit"
                            },
                            "X-RateLimit-Daily-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Remaining"
                            },
                            "X-RateLimit-Daily-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Reset"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/JobRequestResponseResource"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized user.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationError"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimitExceeded"
                    },
                    "403": {
                        "$ref": "#/components/responses/AccountSuspended"
                    },
                    "402": {
                        "$ref": "#/components/responses/KeyLimitExceeded"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/images/ocr": {
            "post": {
                "tags": [
                    "Client API v2"
                ],
                "summary": "Extract text from an image via OCR",
                "description": "Extract text from an image via OCR.",
                "operationId": "extractImageText",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptHeader"
                    }
                ],
                "requestBody": {
                    "description": "Image to text conversion parameters",
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "$ref": "#/components/schemas/Img2TxtRequestBody"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "ID of the inference request.",
                        "headers": {
                            "X-RateLimit-Policy": {
                                "$ref": "#/components/headers/X-RateLimit-Policy"
                            },
                            "X-RateLimit-Source": {
                                "$ref": "#/components/headers/X-RateLimit-Source"
                            },
                            "X-RateLimit-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Limit"
                            },
                            "X-RateLimit-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Remaining"
                            },
                            "X-RateLimit-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Reset"
                            },
                            "X-RateLimit-Daily-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Limit"
                            },
                            "X-RateLimit-Daily-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Remaining"
                            },
                            "X-RateLimit-Daily-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Reset"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/JobRequestResponseResource"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized user.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationError"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimitExceeded"
                    },
                    "403": {
                        "$ref": "#/components/responses/AccountSuspended"
                    },
                    "402": {
                        "$ref": "#/components/responses/KeyLimitExceeded"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/videos/animations": {
            "post": {
                "tags": [
                    "Client API v2"
                ],
                "summary": "Animate a still image into a video",
                "description": "Animate a still image into a video.",
                "operationId": "animateImage",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptHeader"
                    }
                ],
                "requestBody": {
                    "description": "Image to video generation parameters",
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "$ref": "#/components/schemas/Img2VideoRequestBody"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "ID of the inference request.",
                        "headers": {
                            "X-RateLimit-Policy": {
                                "$ref": "#/components/headers/X-RateLimit-Policy"
                            },
                            "X-RateLimit-Source": {
                                "$ref": "#/components/headers/X-RateLimit-Source"
                            },
                            "X-RateLimit-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Limit"
                            },
                            "X-RateLimit-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Remaining"
                            },
                            "X-RateLimit-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Reset"
                            },
                            "X-RateLimit-Daily-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Limit"
                            },
                            "X-RateLimit-Daily-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Remaining"
                            },
                            "X-RateLimit-Daily-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Reset"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/JobRequestResponseResource"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized user.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationError"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimitExceeded"
                    },
                    "403": {
                        "$ref": "#/components/responses/AccountSuspended"
                    },
                    "402": {
                        "$ref": "#/components/responses/KeyLimitExceeded"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/images/background-removals": {
            "post": {
                "tags": [
                    "Client API v2"
                ],
                "summary": "Remove the background from an image",
                "description": "Remove the background from an image.",
                "operationId": "removeImageBackground",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptHeader"
                    }
                ],
                "requestBody": {
                    "description": "Image background removal parameters",
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "$ref": "#/components/schemas/ImageRemoveBgRequestBody"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "ID of the inference request.",
                        "headers": {
                            "X-RateLimit-Policy": {
                                "$ref": "#/components/headers/X-RateLimit-Policy"
                            },
                            "X-RateLimit-Source": {
                                "$ref": "#/components/headers/X-RateLimit-Source"
                            },
                            "X-RateLimit-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Limit"
                            },
                            "X-RateLimit-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Remaining"
                            },
                            "X-RateLimit-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Reset"
                            },
                            "X-RateLimit-Daily-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Limit"
                            },
                            "X-RateLimit-Daily-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Remaining"
                            },
                            "X-RateLimit-Daily-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Reset"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/JobRequestResponseResource"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized user.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationError"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimitExceeded"
                    },
                    "403": {
                        "$ref": "#/components/responses/AccountSuspended"
                    },
                    "402": {
                        "$ref": "#/components/responses/KeyLimitExceeded"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/images/upscales": {
            "post": {
                "tags": [
                    "Client API v2"
                ],
                "summary": "Upscale an image to a higher resolution",
                "description": "Upscale an image to a higher resolution.",
                "operationId": "upscaleImage",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptHeader"
                    }
                ],
                "requestBody": {
                    "description": "Image upscaling parameters",
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "$ref": "#/components/schemas/ImageUpscaleRequestBody"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "ID of the inference request.",
                        "headers": {
                            "X-RateLimit-Policy": {
                                "$ref": "#/components/headers/X-RateLimit-Policy"
                            },
                            "X-RateLimit-Source": {
                                "$ref": "#/components/headers/X-RateLimit-Source"
                            },
                            "X-RateLimit-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Limit"
                            },
                            "X-RateLimit-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Remaining"
                            },
                            "X-RateLimit-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Reset"
                            },
                            "X-RateLimit-Daily-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Limit"
                            },
                            "X-RateLimit-Daily-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Remaining"
                            },
                            "X-RateLimit-Daily-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Reset"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/JobRequestResponseResource"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized user.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationError"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimitExceeded"
                    },
                    "403": {
                        "$ref": "#/components/responses/AccountSuspended"
                    },
                    "402": {
                        "$ref": "#/components/responses/KeyLimitExceeded"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/audio/speech": {
            "post": {
                "tags": [
                    "Client API v2"
                ],
                "summary": "Generate speech audio from text",
                "description": "Generate speech audio from text. Supports three TTS modes: custom_voice (default, preset speakers), voice_clone (clone from reference audio), voice_design (create voice from description).",
                "operationId": "generateSpeech",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptHeader"
                    }
                ],
                "requestBody": {
                    "description": "Audio generation parameters. Supports three TTS modes: custom_voice (default, preset speakers), voice_clone (clone from reference audio), voice_design (create voice from description).",
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "$ref": "#/components/schemas/Txt2AudioRequestBody"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "ID of the inference request.",
                        "headers": {
                            "X-RateLimit-Policy": {
                                "$ref": "#/components/headers/X-RateLimit-Policy"
                            },
                            "X-RateLimit-Source": {
                                "$ref": "#/components/headers/X-RateLimit-Source"
                            },
                            "X-RateLimit-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Limit"
                            },
                            "X-RateLimit-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Remaining"
                            },
                            "X-RateLimit-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Reset"
                            },
                            "X-RateLimit-Daily-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Limit"
                            },
                            "X-RateLimit-Daily-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Remaining"
                            },
                            "X-RateLimit-Daily-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Reset"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/JobRequestResponseResource"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized user.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationError"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimitExceeded"
                    },
                    "403": {
                        "$ref": "#/components/responses/AccountSuspended"
                    },
                    "402": {
                        "$ref": "#/components/responses/KeyLimitExceeded"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/embeddings": {
            "post": {
                "tags": [
                    "Client API v2"
                ],
                "summary": "Generate embeddings for one or more input texts",
                "description": "Generate embeddings for one or more input texts.",
                "operationId": "createEmbedding",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptHeader"
                    }
                ],
                "requestBody": {
                    "description": "Text to embedding conversion parameters",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/Txt2EmbeddingRequestBody"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "ID of the inference request.",
                        "headers": {
                            "X-RateLimit-Policy": {
                                "$ref": "#/components/headers/X-RateLimit-Policy"
                            },
                            "X-RateLimit-Source": {
                                "$ref": "#/components/headers/X-RateLimit-Source"
                            },
                            "X-RateLimit-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Limit"
                            },
                            "X-RateLimit-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Remaining"
                            },
                            "X-RateLimit-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Reset"
                            },
                            "X-RateLimit-Daily-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Limit"
                            },
                            "X-RateLimit-Daily-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Remaining"
                            },
                            "X-RateLimit-Daily-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Reset"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/JobRequestResponseResource"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized user.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationError"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimitExceeded"
                    },
                    "403": {
                        "$ref": "#/components/responses/AccountSuspended"
                    },
                    "402": {
                        "$ref": "#/components/responses/KeyLimitExceeded"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/images/generations": {
            "post": {
                "tags": [
                    "Client API v2"
                ],
                "summary": "Generate an image from a text prompt",
                "description": "Generate an image from a text prompt.",
                "operationId": "generateImage",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptHeader"
                    }
                ],
                "requestBody": {
                    "description": "Image generation parameters",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/Txt2ImgRequestBody"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "ID of the inference request.",
                        "headers": {
                            "X-RateLimit-Policy": {
                                "$ref": "#/components/headers/X-RateLimit-Policy"
                            },
                            "X-RateLimit-Source": {
                                "$ref": "#/components/headers/X-RateLimit-Source"
                            },
                            "X-RateLimit-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Limit"
                            },
                            "X-RateLimit-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Remaining"
                            },
                            "X-RateLimit-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Reset"
                            },
                            "X-RateLimit-Daily-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Limit"
                            },
                            "X-RateLimit-Daily-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Remaining"
                            },
                            "X-RateLimit-Daily-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Reset"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/JobRequestResponseResource"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized user.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationError"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimitExceeded"
                    },
                    "403": {
                        "$ref": "#/components/responses/AccountSuspended"
                    },
                    "402": {
                        "$ref": "#/components/responses/KeyLimitExceeded"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/audio/music": {
            "post": {
                "tags": [
                    "Client API v2"
                ],
                "summary": "Generate music from a text prompt",
                "description": "Generate music from a text prompt.",
                "operationId": "generateMusic",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptHeader"
                    }
                ],
                "requestBody": {
                    "description": "Music generation parameters",
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "$ref": "#/components/schemas/Txt2MusicRequestBody"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "ID of the inference request.",
                        "headers": {
                            "X-RateLimit-Policy": {
                                "$ref": "#/components/headers/X-RateLimit-Policy"
                            },
                            "X-RateLimit-Source": {
                                "$ref": "#/components/headers/X-RateLimit-Source"
                            },
                            "X-RateLimit-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Limit"
                            },
                            "X-RateLimit-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Remaining"
                            },
                            "X-RateLimit-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Reset"
                            },
                            "X-RateLimit-Daily-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Limit"
                            },
                            "X-RateLimit-Daily-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Remaining"
                            },
                            "X-RateLimit-Daily-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Reset"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/JobRequestResponseResource"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized user.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Model not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationError"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimitExceeded"
                    },
                    "403": {
                        "$ref": "#/components/responses/AccountSuspended"
                    },
                    "402": {
                        "$ref": "#/components/responses/KeyLimitExceeded"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/videos/generations": {
            "post": {
                "tags": [
                    "Client API v2"
                ],
                "summary": "Generate a video from a text prompt",
                "description": "Generate a video from a text prompt.",
                "operationId": "generateVideo",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptHeader"
                    }
                ],
                "requestBody": {
                    "description": "Text to video conversion parameters",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/Txt2VideoRequestBody"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "ID of the inference request.",
                        "headers": {
                            "X-RateLimit-Policy": {
                                "$ref": "#/components/headers/X-RateLimit-Policy"
                            },
                            "X-RateLimit-Source": {
                                "$ref": "#/components/headers/X-RateLimit-Source"
                            },
                            "X-RateLimit-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Limit"
                            },
                            "X-RateLimit-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Remaining"
                            },
                            "X-RateLimit-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Reset"
                            },
                            "X-RateLimit-Daily-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Limit"
                            },
                            "X-RateLimit-Daily-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Remaining"
                            },
                            "X-RateLimit-Daily-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Reset"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/JobRequestResponseResource"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized user.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationError"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimitExceeded"
                    },
                    "403": {
                        "$ref": "#/components/responses/AccountSuspended"
                    },
                    "402": {
                        "$ref": "#/components/responses/KeyLimitExceeded"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/audio/transcriptions": {
            "post": {
                "tags": [
                    "Client API v2"
                ],
                "summary": "Transcribe audio or video to text",
                "description": "Transcribe audio or video to text. Accepts either a source URL (YouTube, Twitter, Twitch, Kick, TikTok, Twitter Spaces) or a file upload (audio/video). The job type is auto-detected from the input.",
                "operationId": "createTranscription",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptHeader"
                    }
                ],
                "requestBody": {
                    "description": "Transcription parameters. Provide exactly one of source_url or source_file.",
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "$ref": "#/components/schemas/TranscribeRequestBody"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "ID of the inference request.",
                        "headers": {
                            "X-RateLimit-Policy": {
                                "$ref": "#/components/headers/X-RateLimit-Policy"
                            },
                            "X-RateLimit-Source": {
                                "$ref": "#/components/headers/X-RateLimit-Source"
                            },
                            "X-RateLimit-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Limit"
                            },
                            "X-RateLimit-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Remaining"
                            },
                            "X-RateLimit-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Reset"
                            },
                            "X-RateLimit-Daily-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Limit"
                            },
                            "X-RateLimit-Daily-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Remaining"
                            },
                            "X-RateLimit-Daily-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Reset"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/JobRequestResponseResource"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized user.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationError"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimitExceeded"
                    },
                    "403": {
                        "$ref": "#/components/responses/AccountSuspended"
                    },
                    "402": {
                        "$ref": "#/components/responses/KeyLimitExceeded"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/videos/descriptions": {
            "post": {
                "tags": [
                    "Client API v2"
                ],
                "summary": "Describe what happens in a video",
                "description": "Produce a timestamped index of what happens on screen — a list of events, each with `start`, `end` (seconds) and a `description` — plus scene boundaries and source metadata. Reads the picture, not the audio track; for speech use POST /api/v2/audio/transcriptions. Accepts either a video URL (YouTube, Twitter/X, Twitch, Kick, TikTok) or a file upload. The result is a JSON document: `{\"events\": [{\"start\", \"end\", \"description\", \"merged?\", \"edge_distance\"}], \"scenes\": [...], \"meta\": {\"duration\", \"preset\", ...}}`, delivered as `result_url` on the job (and as a serialized JSON string in `result` when `return_result_in_response` is set). Priced on machine time at the model's hourly rate — longer videos and higher presets cost more — or, for TikTok, on a fixed card by length capped at 10 minutes; see POST /api/v2/videos/descriptions/price.",
                "operationId": "createVideoDescription",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptHeader"
                    }
                ],
                "requestBody": {
                    "description": "Video description parameters. Provide exactly one of video_url or video_file.",
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "$ref": "#/components/schemas/VideoDescriptionRequestBody"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "ID of the inference request.",
                        "headers": {
                            "X-RateLimit-Policy": {
                                "$ref": "#/components/headers/X-RateLimit-Policy"
                            },
                            "X-RateLimit-Source": {
                                "$ref": "#/components/headers/X-RateLimit-Source"
                            },
                            "X-RateLimit-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Limit"
                            },
                            "X-RateLimit-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Remaining"
                            },
                            "X-RateLimit-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Reset"
                            },
                            "X-RateLimit-Daily-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Limit"
                            },
                            "X-RateLimit-Daily-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Remaining"
                            },
                            "X-RateLimit-Daily-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Reset"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/JobRequestResponseResource"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized user.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationError"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimitExceeded"
                    },
                    "403": {
                        "$ref": "#/components/responses/AccountSuspended"
                    },
                    "402": {
                        "$ref": "#/components/responses/KeyLimitExceeded"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/videos/background-removals": {
            "post": {
                "tags": [
                    "Client API v2"
                ],
                "summary": "Remove the background from a video",
                "description": "Remove the background from a video.",
                "operationId": "removeVideoBackground",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptHeader"
                    }
                ],
                "requestBody": {
                    "description": "Video background removal parameters",
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "$ref": "#/components/schemas/VideoRemoveBgRequestBody"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "ID of the inference request.",
                        "headers": {
                            "X-RateLimit-Policy": {
                                "$ref": "#/components/headers/X-RateLimit-Policy"
                            },
                            "X-RateLimit-Source": {
                                "$ref": "#/components/headers/X-RateLimit-Source"
                            },
                            "X-RateLimit-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Limit"
                            },
                            "X-RateLimit-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Remaining"
                            },
                            "X-RateLimit-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Reset"
                            },
                            "X-RateLimit-Daily-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Limit"
                            },
                            "X-RateLimit-Daily-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Remaining"
                            },
                            "X-RateLimit-Daily-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Reset"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/JobRequestResponseResource"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized user.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationError"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimitExceeded"
                    },
                    "403": {
                        "$ref": "#/components/responses/AccountSuspended"
                    },
                    "402": {
                        "$ref": "#/components/responses/KeyLimitExceeded"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/videos/upscales": {
            "post": {
                "tags": [
                    "Client API v2"
                ],
                "summary": "Upscale a video to a higher resolution",
                "description": "Upscale a video to a higher resolution.",
                "operationId": "upscaleVideo",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptHeader"
                    }
                ],
                "requestBody": {
                    "description": "Video upscaling parameters",
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "$ref": "#/components/schemas/VideoUpscaleRequestBody"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "ID of the inference request.",
                        "headers": {
                            "X-RateLimit-Policy": {
                                "$ref": "#/components/headers/X-RateLimit-Policy"
                            },
                            "X-RateLimit-Source": {
                                "$ref": "#/components/headers/X-RateLimit-Source"
                            },
                            "X-RateLimit-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Limit"
                            },
                            "X-RateLimit-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Remaining"
                            },
                            "X-RateLimit-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Reset"
                            },
                            "X-RateLimit-Daily-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Limit"
                            },
                            "X-RateLimit-Daily-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Remaining"
                            },
                            "X-RateLimit-Daily-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Daily-Reset"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/JobRequestResponseResource"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized user.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/response_error_default"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationError"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimitExceeded"
                    },
                    "403": {
                        "$ref": "#/components/responses/AccountSuspended"
                    },
                    "402": {
                        "$ref": "#/components/responses/KeyLimitExceeded"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        }
    },
    "components": {
        "schemas": {
            "UsageReport": {
                "required": [
                    "from",
                    "to",
                    "group_by",
                    "currency",
                    "totals",
                    "groups"
                ],
                "properties": {
                    "from": {
                        "description": "Start of the range, UTC, inclusive.",
                        "type": "string",
                        "format": "date-time",
                        "example": "2026-09-15T00:00:00+00:00"
                    },
                    "to": {
                        "description": "End of the range, UTC, exclusive.",
                        "type": "string",
                        "format": "date-time",
                        "example": "2026-09-22T00:00:00+00:00"
                    },
                    "group_by": {
                        "type": "string",
                        "example": "day",
                        "enum": [
                            "day",
                            "hour",
                            "type",
                            "model",
                            "key"
                        ]
                    },
                    "currency": {
                        "type": "string",
                        "example": "USD"
                    },
                    "totals": {
                        "$ref": "#/components/schemas/UsageFigures"
                    },
                    "groups": {
                        "description": "Only groups with usage. `key` is: day — `YYYY-MM-DD`; hour — the hour's start (UTC); type — a v2 inference type such as `images.generations`; model — the model slug; key — the API key id, `panel` for what the Dashboard itself ran on the account, `deleted` for keys that no longer exist, null when the request has no recorded origin.",
                        "type": "array",
                        "items": {
                            "allOf": [
                                {
                                    "properties": {
                                        "key": {
                                            "example": "2026-09-21",
                                            "oneOf": [
                                                {
                                                    "type": "string"
                                                },
                                                {
                                                    "type": "integer"
                                                },
                                                {
                                                    "type": "null"
                                                }
                                            ]
                                        },
                                        "name": {
                                            "description": "Only with group_by=key: the key's name, or `Panel` / `Deleted keys` for those two groups.",
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        }
                                    },
                                    "type": "object"
                                },
                                {
                                    "$ref": "#/components/schemas/UsageFigures"
                                }
                            ]
                        }
                    }
                },
                "type": "object"
            },
            "UsageFigures": {
                "required": [
                    "cost",
                    "requests",
                    "errors"
                ],
                "properties": {
                    "cost": {
                        "description": "Charged, net of refunds.",
                        "type": "number",
                        "format": "float",
                        "example": 12.345678
                    },
                    "requests": {
                        "description": "Inference requests accepted in the window.",
                        "type": "integer",
                        "example": 830
                    },
                    "errors": {
                        "description": "Of those, requests that ended in an error. Requests refused before a job was created (401, 403, 429) are not counted.",
                        "type": "integer",
                        "example": 4
                    }
                },
                "type": "object"
            },
            "response_error_default": {
                "properties": {
                    "data": {
                        "description": "Information from success endpoint",
                        "type": "object"
                    },
                    "message": {
                        "description": "Error general message",
                        "type": "string"
                    },
                    "errors": {
                        "description": "Information about errors",
                        "type": "array",
                        "items": {}
                    },
                    "statusCode": {
                        "description": "Status code",
                        "type": "integer"
                    },
                    "code": {
                        "description": "A stable, machine-readable reason, on the responses that publish one. Refused credentials (401): `missing_key` — no Bearer credentials arrived at all; `invalid_key` — a key was presented but is unknown, carries the wrong secret, or is malformed; `key_expired` — past its expiry date; `key_revoked` — deactivated. Refused requests: `insufficient_permissions` (403), `ip_not_allowed` (403), `active_key_limit_reached` (422), `insufficient_balance` (422), `key_limit_exceeded` (402), `rate_limited` (429). Absent wherever a response publishes no code, so treat an unknown value as the status code alone — the list grows.",
                        "type": "string",
                        "enum": [
                            "missing_key",
                            "invalid_key",
                            "key_expired",
                            "key_revoked",
                            "insufficient_permissions",
                            "ip_not_allowed",
                            "active_key_limit_reached",
                            "insufficient_balance",
                            "key_limit_exceeded",
                            "rate_limited"
                        ]
                    }
                },
                "type": "object"
            },
            "ApiKeyIpWhitelist": {
                "description": "The addresses an API key may be used from. An empty list means any address, which is what a key carries until a list is set. Entries are single IPv4/IPv6 addresses or CIDR ranges of either family, and a key with a non-empty list is refused from anywhere else — including a call whose address cannot be established. Sending the field replaces the whole list; `[]` clears it. A JSON object is refused, as is an entry that could never gate anything: a `/0` range (say \"any address\" with an empty list instead) and an IPv4 address written in IPv6 notation such as `::ffff:192.0.2.1` (write `192.0.2.1`, the form a caller is matched against).",
                "type": "array",
                "items": {
                    "type": "string",
                    "example": "203.0.113.7"
                },
                "example": [
                    "203.0.113.7",
                    "198.51.100.0/24"
                ],
                "maxItems": 20
            },
            "response_error_rate_limit": {
                "description": "Rate limit exceeded response",
                "properties": {
                    "message": {
                        "description": "Error message",
                        "type": "string",
                        "example": "Too Many Attempts."
                    }
                },
                "type": "object"
            },
            "WebhookProcessingPayload": {
                "title": "Webhook Payload - Job Processing",
                "description": "Payload sent when a job transitions from pending to processing state. Indicates a worker has started processing the job.",
                "required": [
                    "event",
                    "delivery_id",
                    "timestamp",
                    "data"
                ],
                "properties": {
                    "event": {
                        "description": "The event type",
                        "type": "string",
                        "example": "job.processing"
                    },
                    "delivery_id": {
                        "description": "Unique identifier for this delivery",
                        "type": "string",
                        "format": "uuid",
                        "example": "550e8400-e29b-41d4-a716-446655440000"
                    },
                    "timestamp": {
                        "description": "ISO 8601 timestamp when the event occurred",
                        "type": "string",
                        "format": "date-time",
                        "example": "2024-01-15T10:30:00.000Z"
                    },
                    "data": {
                        "description": "Event-specific data",
                        "required": [
                            "job_request_id",
                            "status",
                            "previous_status",
                            "job_type",
                            "started_at"
                        ],
                        "properties": {
                            "job_request_id": {
                                "description": "The UUID of the job request",
                                "type": "string",
                                "format": "uuid",
                                "example": "123e4567-e89b-12d3-a456-426614174000"
                            },
                            "status": {
                                "description": "Current job status",
                                "type": "string",
                                "example": "processing"
                            },
                            "previous_status": {
                                "description": "Previous job status",
                                "type": "string",
                                "example": "pending"
                            },
                            "job_type": {
                                "description": "Type of inference job",
                                "type": "string",
                                "example": "txt2img",
                                "enum": [
                                    "txt2img",
                                    "img2txt",
                                    "txt2audio",
                                    "vid2txt",
                                    "aud2txt",
                                    "txt2video",
                                    "img2video",
                                    "img2img",
                                    "img_upscale",
                                    "img_rmbg",
                                    "vid_upscale",
                                    "vid_rmbg",
                                    "txt2embedding",
                                    "videofile2txt",
                                    "audiofile2txt"
                                ]
                            },
                            "started_at": {
                                "description": "ISO 8601 timestamp when processing started",
                                "type": "string",
                                "format": "date-time",
                                "example": "2024-01-15T10:30:00.000Z"
                            }
                        },
                        "type": "object"
                    }
                },
                "type": "object"
            },
            "WebhookCompletedPayload": {
                "title": "Webhook Payload - Job Completed",
                "description": "Payload sent when a job completes successfully. Includes the result URL for downloading the output and what the request cost.",
                "required": [
                    "event",
                    "delivery_id",
                    "timestamp",
                    "data"
                ],
                "properties": {
                    "event": {
                        "description": "The event type",
                        "type": "string",
                        "example": "job.completed"
                    },
                    "delivery_id": {
                        "description": "Unique identifier for this delivery",
                        "type": "string",
                        "format": "uuid",
                        "example": "550e8400-e29b-41d4-a716-446655440001"
                    },
                    "timestamp": {
                        "description": "ISO 8601 timestamp when the event occurred",
                        "type": "string",
                        "format": "date-time",
                        "example": "2024-01-15T10:30:45.000Z"
                    },
                    "data": {
                        "description": "Event-specific data",
                        "required": [
                            "job_request_id",
                            "status",
                            "previous_status",
                            "job_type",
                            "completed_at",
                            "result_url",
                            "processing_time_ms"
                        ],
                        "properties": {
                            "job_request_id": {
                                "description": "The UUID of the job request",
                                "type": "string",
                                "format": "uuid",
                                "example": "123e4567-e89b-12d3-a456-426614174000"
                            },
                            "status": {
                                "description": "Current job status",
                                "type": "string",
                                "example": "done"
                            },
                            "previous_status": {
                                "description": "Previous job status",
                                "type": "string",
                                "example": "processing"
                            },
                            "job_type": {
                                "description": "Type of inference job",
                                "type": "string",
                                "example": "txt2img",
                                "enum": [
                                    "txt2img",
                                    "img2txt",
                                    "txt2audio",
                                    "vid2txt",
                                    "aud2txt",
                                    "txt2video",
                                    "img2video",
                                    "img2img",
                                    "img_upscale",
                                    "img_rmbg",
                                    "vid_upscale",
                                    "vid_rmbg",
                                    "txt2embedding",
                                    "videofile2txt",
                                    "audiofile2txt"
                                ]
                            },
                            "completed_at": {
                                "description": "ISO 8601 timestamp when the job completed",
                                "type": "string",
                                "format": "date-time",
                                "example": "2024-01-15T10:30:45.000Z"
                            },
                            "result_url": {
                                "description": "URL to download the job result",
                                "type": "string",
                                "format": "uri",
                                "example": "https://storage.deapi.ai/results/123e4567-e89b-12d3-a456-426614174000/output.png"
                            },
                            "processing_time_ms": {
                                "description": "Total processing time in milliseconds",
                                "type": "integer",
                                "example": 45000
                            },
                            "price": {
                                "description": "What this request cost you, in credits — the same figure GET /jobs/{uuid} reports. For models served by an external provider the charge settles after inference, so this may be the estimate quoted at submission, flagged is_estimated; the settled charge can differ from it. Own-fleet models are charged up front and always report the exact figure.",
                                "properties": {
                                    "amount": {
                                        "description": "Credits charged for this request",
                                        "type": "number",
                                        "format": "float",
                                        "example": 0.0234
                                    },
                                    "is_estimated": {
                                        "description": "True when the figure is the submission-time estimate rather than a settled charge. Do not use an estimated value for reconciliation or invoicing.",
                                        "type": "boolean",
                                        "example": false
                                    }
                                },
                                "type": [
                                    "object",
                                    "null"
                                ]
                            }
                        },
                        "type": "object"
                    }
                },
                "type": "object"
            },
            "WebhookFailedPayload": {
                "title": "Webhook Payload - Job Failed",
                "description": "Payload sent when a job fails during processing. Includes error details for debugging.",
                "required": [
                    "event",
                    "delivery_id",
                    "timestamp",
                    "data"
                ],
                "properties": {
                    "event": {
                        "description": "The event type",
                        "type": "string",
                        "example": "job.failed"
                    },
                    "delivery_id": {
                        "description": "Unique identifier for this delivery",
                        "type": "string",
                        "format": "uuid",
                        "example": "550e8400-e29b-41d4-a716-446655440002"
                    },
                    "timestamp": {
                        "description": "ISO 8601 timestamp when the event occurred",
                        "type": "string",
                        "format": "date-time",
                        "example": "2024-01-15T10:30:45.000Z"
                    },
                    "data": {
                        "description": "Event-specific data",
                        "required": [
                            "job_request_id",
                            "status",
                            "previous_status",
                            "job_type",
                            "failed_at",
                            "error_code"
                        ],
                        "properties": {
                            "job_request_id": {
                                "description": "The UUID of the job request",
                                "type": "string",
                                "format": "uuid",
                                "example": "123e4567-e89b-12d3-a456-426614174000"
                            },
                            "status": {
                                "description": "Current job status",
                                "type": "string",
                                "example": "error"
                            },
                            "previous_status": {
                                "description": "Previous job status",
                                "type": "string",
                                "example": "processing"
                            },
                            "job_type": {
                                "description": "Type of inference job",
                                "type": "string",
                                "example": "txt2img",
                                "enum": [
                                    "txt2img",
                                    "img2txt",
                                    "txt2audio",
                                    "vid2txt",
                                    "aud2txt",
                                    "txt2video",
                                    "img2video",
                                    "img2img",
                                    "img_upscale",
                                    "img_rmbg",
                                    "vid_upscale",
                                    "vid_rmbg",
                                    "txt2embedding",
                                    "videofile2txt",
                                    "audiofile2txt",
                                    null
                                ]
                            },
                            "failed_at": {
                                "description": "ISO 8601 timestamp when the job failed",
                                "type": "string",
                                "format": "date-time",
                                "example": "2024-01-15T10:30:45.000Z"
                            },
                            "error_code": {
                                "description": "Machine-readable error code",
                                "type": "string",
                                "example": "WORKER_TIMEOUT",
                                "enum": [
                                    "WORKER_TIMEOUT",
                                    "WORKER_ERROR",
                                    "PROCESSING_ERROR"
                                ]
                            },
                            "error_reason": {
                                "description": "Bounded, actionable failure reason: SOURCE_PRIVATE, SOURCE_RESTRICTED, SOURCE_UNPROCESSABLE, SOURCE_DOWNLOAD_FAILED, INPUT_TOO_LARGE, TIMEOUT, CAPACITY_UNAVAILABLE or PROCESSING_FAILED. THIS LIST IS OPEN — new values may be added without a major version, so treat any unrecognised value as PROCESSING_FAILED. Prefer branching on `retryable`.",
                                "type": "string",
                                "example": "SOURCE_DOWNLOAD_FAILED"
                            },
                            "retryable": {
                                "description": "Whether resubmitting the identical request could plausibly succeed. Branch on this rather than on error_reason — it stays correct as new reasons are added.",
                                "type": "boolean",
                                "example": true
                            },
                            "refunded": {
                                "description": "Whether the upfront charge for this job was returned. False covers both a charge deliberately kept and a job that failed before it was ever charged.",
                                "type": "boolean",
                                "example": true
                            },
                            "price": {
                                "description": "What this request cost you, in credits — the same figure GET /jobs/{uuid} reports. A refunded or never-charged request reports 0. For models served by an external provider the charge settles after inference, so on job.completed this may be the estimate quoted at submission, flagged is_estimated; the settled charge can differ from it. Own-fleet models are charged up front and always report the exact figure.",
                                "properties": {
                                    "amount": {
                                        "description": "Credits charged for this request",
                                        "type": "number",
                                        "format": "float",
                                        "example": 0.0234
                                    },
                                    "is_estimated": {
                                        "description": "True when the figure is the submission-time estimate rather than a settled charge. Do not use an estimated value for reconciliation or invoicing.",
                                        "type": "boolean",
                                        "example": false
                                    }
                                },
                                "type": [
                                    "object",
                                    "null"
                                ]
                            }
                        },
                        "type": "object"
                    }
                },
                "type": "object"
            },
            "Aud2VideoRequestBody": {
                "description": "Every example in this schema is a working set for the `model` example shown — they are not defaults and not portable. Sizes, step counts, frame counts and frame rates are all per-model: read `info.limits` and `info.defaults` for the model you actually intend to use from `GET /api/v2/models`. Substituting a different `model` while keeping these values is the most common source of a 422.",
                "required": [
                    "prompt",
                    "audio",
                    "model",
                    "width",
                    "height",
                    "seed",
                    "frames",
                    "fps"
                ],
                "properties": {
                    "prompt": {
                        "description": "The main prompt for video generation",
                        "type": "string",
                        "example": "A beautiful sunset over mountains with dramatic music"
                    },
                    "negative_prompt": {
                        "description": "Elements to avoid in the generated video. Dropped (not forwarded to the worker) when the model declares `info.features.supports_negative_prompt: false`.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "example": "blur, darkness, noise"
                    },
                    "audio": {
                        "description": "Audio file to condition the video generation. Supported formats: MP3, WAV, OGG, FLAC. Maximum file size: 20 MB.",
                        "type": "string",
                        "format": "binary"
                    },
                    "first_frame_image": {
                        "description": "Image for the first frame of video (optional). Supported formats: JPG, JPEG, PNG, GIF, BMP, WebP. Maximum file size: 10 MB.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "binary"
                    },
                    "last_frame_image": {
                        "description": "Image for the last frame of video (optional). Supported formats: JPG, JPEG, PNG, GIF, BMP, WebP. Maximum file size: 10 MB.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "binary"
                    },
                    "width": {
                        "description": "Width of the generated video in pixels. The accepted range is model-specific — read `info.limits.min_width`/`max_width` and `min_height`/`max_height` for your `model` from `GET /api/v2/models`. Some models also publish `dimension_multiple` or `resolution_step`: values are snapped DOWN to that grid before validation, so an off-grid size is silently reduced rather than rejected. `max_pixels` and `max_ratio`, where present, cap total area and aspect ratio on top of the per-side bounds.",
                        "type": "integer",
                        "example": 512
                    },
                    "height": {
                        "description": "Height of the generated video in pixels. The accepted range is model-specific — read `info.limits.min_width`/`max_width` and `min_height`/`max_height` for your `model` from `GET /api/v2/models`. Some models also publish `dimension_multiple` or `resolution_step`: values are snapped DOWN to that grid before validation, so an off-grid size is silently reduced rather than rejected. `max_pixels` and `max_ratio`, where present, cap total area and aspect ratio on top of the per-side bounds.",
                        "type": "integer",
                        "example": 512
                    },
                    "guidance": {
                        "description": "Guidance scale. Bounded by `info.limits.min_guidance` / `max_guidance` from `GET /api/v2/models` (0–30 when the model declares none). Required when the model declares `info.features.supports_guidance: true`; optional when the flag is absent. When the model declares `supports_guidance: false` the value is accepted and dropped — it is neither forwarded to the worker nor priced.",
                        "type": "number",
                        "example": 7.5
                    },
                    "steps": {
                        "description": "Number of inference steps. Bounded by `info.limits.min_steps` / `max_steps` from `GET /api/v2/models` (1–100 when the model declares none). Required when the model declares `info.features.supports_steps: true`; optional when the flag is absent. When the model declares `supports_steps: false` the value is accepted and dropped — it is neither forwarded to the worker nor priced.",
                        "type": "integer",
                        "example": 20
                    },
                    "frames": {
                        "description": "Number of video frames to generate. The accepted range is model-specific — read `info.limits.min_frames`/`max_frames` for your `model` from `GET /api/v2/models`; a value outside it is rejected with 422.",
                        "type": "integer",
                        "example": 97
                    },
                    "fps": {
                        "description": "FPS of the generated video. The model dictates the value: read `info.defaults.fps` for your `model` from `GET /api/v2/models`. Where `min_fps` equals `max_fps` that is the only accepted value; anything outside the range is rejected with 422.",
                        "type": "integer",
                        "example": 24
                    },
                    "seed": {
                        "description": "Random seed for generation",
                        "type": "integer",
                        "example": 42
                    },
                    "model": {
                        "description": "The model to use for video generation. Available models can be retrieved via the GET /api/v2/models endpoint.",
                        "type": "string",
                        "example": "Ltx2_3_22B_Dist_INT8"
                    },
                    "webhook_url": {
                        "description": "Optional HTTPS URL to receive webhook notifications for job status changes (processing, completed, failed). Must be HTTPS. Max 2048 characters. A per-request URL is self-contained: it is delivered even when the account has no webhook configuration, or the account webhook is disabled. See the `webhooks` block at the top level of this document for the event payloads and the headers each delivery carries.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "uri",
                        "example": "https://your-server.com/webhooks/deapi",
                        "maxLength": 2048
                    },
                    "webhook_secret": {
                        "description": "Optional per-request HMAC secret (min. 32 chars) used to sign the webhook callback. Overrides the account-default secret for this job only. If omitted, the account-default secret signs the callback; if no secret exists at all, the callback is still delivered but UNSIGNED (empty X-DeAPI-Signature header). Requires `webhook_url` to also be set.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "example": "a1b2c3d4e5f60708091a2b3c4d5e6f7081920a1b2c3d4e5f60708091a2b3c4d5",
                        "maxLength": 255,
                        "minLength": 32
                    }
                },
                "type": "object"
            },
            "Aud2VideoPriceRequestBody": {
                "description": "Every example in this schema is a working set for the `model` example shown — they are not defaults and not portable. Sizes, step counts, frame counts and frame rates are all per-model: read `info.limits` and `info.defaults` for the model you actually intend to use from `GET /api/v2/models`. Substituting a different `model` while keeping these values is the most common source of a 422.",
                "required": [
                    "model",
                    "width",
                    "height",
                    "frames",
                    "fps"
                ],
                "properties": {
                    "width": {
                        "description": "Width of the generated video in pixels. The accepted range is model-specific — read `info.limits.min_width`/`max_width` and `min_height`/`max_height` for your `model` from `GET /api/v2/models`. Some models also publish `dimension_multiple` or `resolution_step`: values are snapped DOWN to that grid before validation, so an off-grid size is silently reduced rather than rejected. `max_pixels` and `max_ratio`, where present, cap total area and aspect ratio on top of the per-side bounds.",
                        "type": "integer",
                        "example": 512
                    },
                    "height": {
                        "description": "Height of the generated video in pixels. The accepted range is model-specific — read `info.limits.min_width`/`max_width` and `min_height`/`max_height` for your `model` from `GET /api/v2/models`. Some models also publish `dimension_multiple` or `resolution_step`: values are snapped DOWN to that grid before validation, so an off-grid size is silently reduced rather than rejected. `max_pixels` and `max_ratio`, where present, cap total area and aspect ratio on top of the per-side bounds.",
                        "type": "integer",
                        "example": 512
                    },
                    "steps": {
                        "description": "Number of inference steps. Bounded by `info.limits.min_steps` / `max_steps` from `GET /api/v2/models` (1–100 when the model declares none). Required when the model declares `info.features.supports_steps: true`; optional when the flag is absent. When the model declares `supports_steps: false` the value is accepted and dropped — it is neither forwarded to the worker nor priced.",
                        "type": "integer",
                        "example": 20
                    },
                    "frames": {
                        "description": "Number of video frames to generate. The accepted range is model-specific — read `info.limits.min_frames`/`max_frames` for your `model` from `GET /api/v2/models`; a value outside it is rejected with 422.",
                        "type": "integer",
                        "example": 97
                    },
                    "fps": {
                        "description": "FPS of the generated video. The model dictates the value: read `info.defaults.fps` for your `model` from `GET /api/v2/models`. Where `min_fps` equals `max_fps` that is the only accepted value; anything outside the range is rejected with 422.",
                        "type": "integer",
                        "example": 24
                    },
                    "model": {
                        "description": "The model to use for video generation. Available models can be retrieved via the GET /api/v2/models endpoint.",
                        "type": "string",
                        "example": "Ltx2_3_22B_Dist_INT8"
                    }
                },
                "type": "object"
            },
            "Img2ImgPriceRequestBody": {
                "description": "Every example in this schema is a working set for the `model` example shown — they are not defaults and not portable. Sizes, step counts, frame counts and frame rates are all per-model: read `info.limits` and `info.defaults` for the model you actually intend to use from `GET /api/v2/models`. Substituting a different `model` while keeping these values is the most common source of a 422.",
                "required": [
                    "prompt",
                    "model",
                    "seed"
                ],
                "properties": {
                    "prompt": {
                        "description": "The main prompt for image generation",
                        "type": "string",
                        "example": "A beautiful sunset over mountains"
                    },
                    "negative_prompt": {
                        "description": "Elements to avoid in the generated image. Dropped (not forwarded to the worker) when the model declares `info.features.supports_negative_prompt: false`.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "example": "blur, darkness, noise"
                    },
                    "model": {
                        "description": "The model to use for generation",
                        "type": "string",
                        "example": "QwenImageEdit_Plus_NF4"
                    },
                    "loras": {
                        "description": "Array of LoRA models to apply. Only models that publish a `loras` array in `GET /api/v2/models` have any to apply — the `model` example shown here publishes none, so leave the field out unless you switched to a model that does. Example is deliberately empty: a LoRA name is only valid for the one model that lists it.",
                        "type": "array",
                        "items": {
                            "required": [
                                "name",
                                "weight"
                            ],
                            "properties": {
                                "name": {
                                    "description": "LoRA identifier, copied verbatim from `loras[].name` for your `model` in `GET /api/v2/models`. That is the value the API validates against — not the human-readable `loras[].display_name`.",
                                    "type": "string"
                                },
                                "weight": {
                                    "description": "Weight of the LoRA model (must be non-negative)",
                                    "type": "number",
                                    "minimum": 0
                                }
                            },
                            "type": "object"
                        },
                        "example": []
                    },
                    "guidance": {
                        "description": "Guidance scale. Bounded by `info.limits.min_guidance` / `max_guidance` from `GET /api/v2/models` (0–30 when the model declares none). Required when the model declares `info.features.supports_guidance: true`; optional when the flag is absent. When the model declares `supports_guidance: false` the value is accepted and dropped — it is neither forwarded to the worker nor priced.",
                        "type": "number",
                        "example": 7.5
                    },
                    "steps": {
                        "description": "Number of inference steps. Bounded by `info.limits.min_steps` / `max_steps` from `GET /api/v2/models` (1–100 when the model declares none). Required when the model declares `info.features.supports_steps: true`; optional when the flag is absent. When the model declares `supports_steps: false` the value is accepted and dropped — it is neither forwarded to the worker nor priced.",
                        "type": "integer",
                        "example": 20
                    },
                    "quality": {
                        "description": "Quality tier, for models that support one (e.g. gpt-image: low/medium/high/auto). Only the values listed in that model's available options are accepted; ignored for models without a quality tier. Accepted values are model-specific — read `info.limits.quality_options` for your `model` from `GET /api/v2/models`. A model with an empty or absent list does not support a quality tier and ignores the field.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "example": "medium"
                    },
                    "width": {
                        "description": "Requested output width. Does not move the price; accepted so the quote applies the same per-model size box as the generation request (only on a model declaring `info.features.supports_custom_output_size`; ignored otherwise).",
                        "type": [
                            "integer",
                            "null"
                        ],
                        "example": 1024
                    },
                    "height": {
                        "description": "Requested output height. Does not move the price; accepted so the quote applies the same per-model size box as the generation request (only on a model declaring `info.features.supports_custom_output_size`; ignored otherwise).",
                        "type": [
                            "integer",
                            "null"
                        ],
                        "example": 1024
                    },
                    "seed": {
                        "description": "Random seed for generation",
                        "type": "integer",
                        "example": 42
                    }
                },
                "type": "object"
            },
            "Img2TxtPriceRequestBody": {
                "description": "Every example in this schema is a working set for the `model` example shown — they are not defaults and not portable. Sizes, step counts, frame counts and frame rates are all per-model: read `info.limits` and `info.defaults` for the model you actually intend to use from `GET /api/v2/models`. Substituting a different `model` while keeping these values is the most common source of a 422.",
                "oneOf": [
                    {
                        "required": [
                            "image",
                            "model"
                        ],
                        "properties": {
                            "image": {
                                "description": "Image file to extract text from. Supported formats: JPG, JPEG, PNG, GIF, BMP, WebP. Maximum file size: 10 MB.",
                                "type": "string",
                                "format": "binary"
                            },
                            "model": {
                                "description": "The OCR model to use for text extraction. Available models can be retrieved via the GET /api/v2/models endpoint.",
                                "type": "string",
                                "example": "Nanonets_Ocr_S_F16"
                            },
                            "language": {
                                "description": "Language code for OCR processing (optional)",
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "example": "en"
                            },
                            "format": {
                                "description": "Output format for extracted text",
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "example": "text",
                                "enum": [
                                    "text",
                                    "json",
                                    null
                                ]
                            }
                        },
                        "type": "object"
                    },
                    {
                        "required": [
                            "width",
                            "height",
                            "model"
                        ],
                        "properties": {
                            "width": {
                                "description": "Width of image in pixels for price calculation. The accepted range is model-specific — read `info.limits.min_width`/`max_width` and `min_height`/`max_height` for your `model` from `GET /api/v2/models`. Some models also publish `dimension_multiple` or `resolution_step`: values are snapped DOWN to that grid before validation, so an off-grid size is silently reduced rather than rejected. `max_pixels` and `max_ratio`, where present, cap total area and aspect ratio on top of the per-side bounds.",
                                "type": "integer",
                                "example": 1920
                            },
                            "height": {
                                "description": "Height of image in pixels for price calculation. The accepted range is model-specific — read `info.limits.min_width`/`max_width` and `min_height`/`max_height` for your `model` from `GET /api/v2/models`. Some models also publish `dimension_multiple` or `resolution_step`: values are snapped DOWN to that grid before validation, so an off-grid size is silently reduced rather than rejected. `max_pixels` and `max_ratio`, where present, cap total area and aspect ratio on top of the per-side bounds.",
                                "type": "integer",
                                "example": 1080
                            },
                            "model": {
                                "description": "The OCR model to use for text extraction. Available models can be retrieved via the GET /api/v2/models endpoint.",
                                "type": "string",
                                "example": "Nanonets_Ocr_S_F16"
                            },
                            "language": {
                                "description": "Language code for OCR processing (optional)",
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "example": "en"
                            },
                            "format": {
                                "description": "Output format for extracted text",
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "example": "text",
                                "enum": [
                                    "text",
                                    "json",
                                    null
                                ]
                            }
                        },
                        "type": "object"
                    }
                ]
            },
            "Img2VideoPriceRequestBody": {
                "description": "Every example in this schema is a working set for the `model` example shown — they are not defaults and not portable. Sizes, step counts, frame counts and frame rates are all per-model: read `info.limits` and `info.defaults` for the model you actually intend to use from `GET /api/v2/models`. Substituting a different `model` while keeping these values is the most common source of a 422.",
                "required": [
                    "model",
                    "width",
                    "height",
                    "frames",
                    "fps"
                ],
                "properties": {
                    "width": {
                        "description": "Width of the generated video in pixels. The accepted range is model-specific — read `info.limits.min_width`/`max_width` and `min_height`/`max_height` for your `model` from `GET /api/v2/models`. Some models also publish `dimension_multiple` or `resolution_step`: values are snapped DOWN to that grid before validation, so an off-grid size is silently reduced rather than rejected. `max_pixels` and `max_ratio`, where present, cap total area and aspect ratio on top of the per-side bounds.",
                        "type": "integer",
                        "example": 512
                    },
                    "height": {
                        "description": "Height of the generated video in pixels. The accepted range is model-specific — read `info.limits.min_width`/`max_width` and `min_height`/`max_height` for your `model` from `GET /api/v2/models`. Some models also publish `dimension_multiple` or `resolution_step`: values are snapped DOWN to that grid before validation, so an off-grid size is silently reduced rather than rejected. `max_pixels` and `max_ratio`, where present, cap total area and aspect ratio on top of the per-side bounds.",
                        "type": "integer",
                        "example": 512
                    },
                    "steps": {
                        "description": "Number of inference steps. Bounded by `info.limits.min_steps` / `max_steps` from `GET /api/v2/models` (1–100 when the model declares none). Required when the model declares `info.features.supports_steps: true`; optional when the flag is absent. When the model declares `supports_steps: false` the value is accepted and dropped — it is neither forwarded to the worker nor priced.",
                        "type": "integer",
                        "example": 1
                    },
                    "frames": {
                        "description": "Number of video frames to generate. The accepted range is model-specific — read `info.limits.min_frames`/`max_frames` for your `model` from `GET /api/v2/models`; a value outside it is rejected with 422.",
                        "type": "integer",
                        "example": 120
                    },
                    "fps": {
                        "description": "FPS of the generated video. The model dictates the value: read `info.defaults.fps` for your `model` from `GET /api/v2/models`. Where `min_fps` equals `max_fps` that is the only accepted value; anything outside the range is rejected with 422.",
                        "type": "integer",
                        "example": 30
                    },
                    "model": {
                        "description": "The model to use for video generation. Available models can be retrieved via the GET /api/v2/models endpoint.",
                        "type": "string",
                        "example": "Ltxv_13B_0_9_8_Distilled_FP8"
                    },
                    "ref_images_count": {
                        "description": "How many `ref_images` the generation request will carry. **More than 2 reference images multiplies the price by 2** (self-hosted models; a partner-served model is priced by its provider's own rate, without this surcharge). The source image of an img2video request is not a reference image and does not count, so exactly 2 is still unmultiplied. Send the count here rather than the files — a quote never requires an upload.",
                        "type": "integer",
                        "example": 4,
                        "default": 0,
                        "minimum": 0
                    },
                    "ref_videos_count": {
                        "description": "How many `ref_videos` the generation request will carry. **Any reference video multiplies the price by 3** (self-hosted models only). The two surcharges do not compound: the highest applicable multiplier wins, so 4 reference images plus a reference video is x3, not x6. Reference audio carries no surcharge.",
                        "type": "integer",
                        "example": 1,
                        "default": 0,
                        "minimum": 0
                    },
                    "ref_videos_duration": {
                        "description": "Total length in seconds of the `ref_videos` the generation request will carry. Some partner models bill reference video seconds as well as output seconds, at a different rate. Leave it out and such a model quotes its minimum billed input length, so a longer reference costs more than the quote. The job itself is priced from the real files.",
                        "type": "number",
                        "format": "float",
                        "example": 4.5,
                        "default": 0,
                        "minimum": 0
                    },
                    "ref_audios_count": {
                        "description": "How many `ref_audios` the generation request will carry. No surcharge; accepted so the quote applies the same per-model reference limits (`info.limits.max_ref_*`, `info.features.supports_*_refs`) as the generation request. The example set here belongs to the `model` example shown.",
                        "type": "integer",
                        "example": 0,
                        "default": 0,
                        "minimum": 0
                    }
                },
                "type": "object"
            },
            "ImageRemoveBgPriceRequestBody": {
                "description": "Every example in this schema is a working set for the `model` example shown — they are not defaults and not portable. Sizes, step counts, frame counts and frame rates are all per-model: read `info.limits` and `info.defaults` for the model you actually intend to use from `GET /api/v2/models`. Substituting a different `model` while keeping these values is the most common source of a 422.",
                "oneOf": [
                    {
                        "required": [
                            "image",
                            "model"
                        ],
                        "properties": {
                            "image": {
                                "description": "Image file to remove background from. Supported formats: JPG, JPEG, PNG, GIF, BMP, WebP. Maximum file size: 10 MB.",
                                "type": "string",
                                "format": "binary"
                            },
                            "model": {
                                "description": "The background removal model to use",
                                "type": "string",
                                "example": "Ben2"
                            }
                        },
                        "type": "object"
                    },
                    {
                        "required": [
                            "width",
                            "height",
                            "model"
                        ],
                        "properties": {
                            "width": {
                                "description": "Width of image in pixels for price calculation. The accepted range is model-specific — read `info.limits.min_width`/`max_width` and `min_height`/`max_height` for your `model` from `GET /api/v2/models`. Some models also publish `dimension_multiple` or `resolution_step`: values are snapped DOWN to that grid before validation, so an off-grid size is silently reduced rather than rejected. `max_pixels` and `max_ratio`, where present, cap total area and aspect ratio on top of the per-side bounds.",
                                "type": "integer",
                                "example": 1920
                            },
                            "height": {
                                "description": "Height of image in pixels for price calculation. The accepted range is model-specific — read `info.limits.min_width`/`max_width` and `min_height`/`max_height` for your `model` from `GET /api/v2/models`. Some models also publish `dimension_multiple` or `resolution_step`: values are snapped DOWN to that grid before validation, so an off-grid size is silently reduced rather than rejected. `max_pixels` and `max_ratio`, where present, cap total area and aspect ratio on top of the per-side bounds.",
                                "type": "integer",
                                "example": 1080
                            },
                            "model": {
                                "description": "The background removal model to use",
                                "type": "string",
                                "example": "Ben2"
                            }
                        },
                        "type": "object"
                    }
                ]
            },
            "ImageUpscalePriceRequestBody": {
                "description": "Every example in this schema is a working set for the `model` example shown — they are not defaults and not portable. Sizes, step counts, frame counts and frame rates are all per-model: read `info.limits` and `info.defaults` for the model you actually intend to use from `GET /api/v2/models`. Substituting a different `model` while keeping these values is the most common source of a 422.",
                "oneOf": [
                    {
                        "required": [
                            "image",
                            "model"
                        ],
                        "properties": {
                            "image": {
                                "description": "Image file to upscale. Supported formats: JPG, JPEG, PNG, GIF, BMP, WebP. Maximum file size: 10 MB.",
                                "type": "string",
                                "format": "binary"
                            },
                            "model": {
                                "description": "The upscaling model to use",
                                "type": "string",
                                "example": "RealESRGAN_x4"
                            }
                        },
                        "type": "object"
                    },
                    {
                        "required": [
                            "width",
                            "height",
                            "model"
                        ],
                        "properties": {
                            "width": {
                                "description": "Width of image in pixels for price calculation. The accepted range is model-specific — read `info.limits.min_width`/`max_width` and `min_height`/`max_height` for your `model` from `GET /api/v2/models`. Some models also publish `dimension_multiple` or `resolution_step`: values are snapped DOWN to that grid before validation, so an off-grid size is silently reduced rather than rejected. `max_pixels` and `max_ratio`, where present, cap total area and aspect ratio on top of the per-side bounds.",
                                "type": "integer",
                                "example": 1920
                            },
                            "height": {
                                "description": "Height of image in pixels for price calculation. The accepted range is model-specific — read `info.limits.min_width`/`max_width` and `min_height`/`max_height` for your `model` from `GET /api/v2/models`. Some models also publish `dimension_multiple` or `resolution_step`: values are snapped DOWN to that grid before validation, so an off-grid size is silently reduced rather than rejected. `max_pixels` and `max_ratio`, where present, cap total area and aspect ratio on top of the per-side bounds.",
                                "type": "integer",
                                "example": 1080
                            },
                            "model": {
                                "description": "The upscaling model to use",
                                "type": "string",
                                "example": "RealESRGAN_x4"
                            }
                        },
                        "type": "object"
                    }
                ]
            },
            "Txt2ImgPriceRequestBody": {
                "description": "Every example in this schema is a working set for the `model` example shown — they are not defaults and not portable. Sizes, step counts, frame counts and frame rates are all per-model: read `info.limits` and `info.defaults` for the model you actually intend to use from `GET /api/v2/models`. Substituting a different `model` while keeping these values is the most common source of a 422.",
                "required": [
                    "prompt",
                    "model",
                    "width",
                    "height",
                    "seed"
                ],
                "properties": {
                    "prompt": {
                        "description": "The main prompt for image generation",
                        "type": "string",
                        "example": "A beautiful sunset over mountains"
                    },
                    "negative_prompt": {
                        "description": "Elements to avoid in the generated image. Dropped (not forwarded to the worker) when the model declares `info.features.supports_negative_prompt: false`.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "example": "blur, darkness, noise"
                    },
                    "model": {
                        "description": "The model to use for image generation. Available models can be retrieved via the GET /api/v2/models endpoint.",
                        "type": "string",
                        "example": "Flux1schnell"
                    },
                    "loras": {
                        "description": "Array of LoRA models to apply. Accepted only by models that publish a `loras` array in `GET /api/v2/models` — a LoRA not listed for the selected `model` is rejected with a 422. The example below belongs to the `model` example shown and is not portable to another model.",
                        "type": "array",
                        "items": {
                            "required": [
                                "name",
                                "weight"
                            ],
                            "properties": {
                                "name": {
                                    "description": "LoRA identifier, copied verbatim from `loras[].name` for your `model` in `GET /api/v2/models`. That is the value the API validates against — not the human-readable `loras[].display_name`.",
                                    "type": "string",
                                    "example": "PepeFluxSchnellLora"
                                },
                                "weight": {
                                    "description": "Weight of the LoRA model (must be non-negative)",
                                    "type": "number",
                                    "example": 0.75,
                                    "minimum": 0
                                }
                            },
                            "type": "object"
                        }
                    },
                    "width": {
                        "description": "Width of the generated image in pixels. The accepted range is model-specific — read `info.limits.min_width`/`max_width` and `min_height`/`max_height` for your `model` from `GET /api/v2/models`. Some models also publish `dimension_multiple` or `resolution_step`: values are snapped DOWN to that grid before validation, so an off-grid size is silently reduced rather than rejected. `max_pixels` and `max_ratio`, where present, cap total area and aspect ratio on top of the per-side bounds.",
                        "type": "integer",
                        "example": 512
                    },
                    "height": {
                        "description": "Height of the generated image in pixels. The accepted range is model-specific — read `info.limits.min_width`/`max_width` and `min_height`/`max_height` for your `model` from `GET /api/v2/models`. Some models also publish `dimension_multiple` or `resolution_step`: values are snapped DOWN to that grid before validation, so an off-grid size is silently reduced rather than rejected. `max_pixels` and `max_ratio`, where present, cap total area and aspect ratio on top of the per-side bounds.",
                        "type": "integer",
                        "example": 512
                    },
                    "guidance": {
                        "description": "Guidance scale. Bounded by `info.limits.min_guidance` / `max_guidance` from `GET /api/v2/models` (0–30 when the model declares none). Required when the model declares `info.features.supports_guidance: true`; optional when the flag is absent. When the model declares `supports_guidance: false` the value is accepted and dropped — it is neither forwarded to the worker nor priced.",
                        "type": "number",
                        "example": 7.5
                    },
                    "steps": {
                        "description": "Number of inference steps. Bounded by `info.limits.min_steps` / `max_steps` from `GET /api/v2/models` (1–100 when the model declares none). Required when the model declares `info.features.supports_steps: true`; optional when the flag is absent. When the model declares `supports_steps: false` the value is accepted and dropped — it is neither forwarded to the worker nor priced.",
                        "type": "integer",
                        "example": 4
                    },
                    "quality": {
                        "description": "Quality tier, for models that support one (e.g. gpt-image: low/medium/high/auto). Only the values listed in that model's available options are accepted; ignored for models without a quality tier. Accepted values are model-specific — read `info.limits.quality_options` for your `model` from `GET /api/v2/models`. A model with an empty or absent list does not support a quality tier and ignores the field.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "example": "medium"
                    },
                    "seed": {
                        "description": "Random seed for generation",
                        "type": "integer",
                        "example": 42
                    }
                },
                "type": "object"
            },
            "Txt2AudioPriceRequestBody": {
                "required": [
                    "model",
                    "lang",
                    "speed",
                    "format",
                    "sample_rate"
                ],
                "properties": {
                    "text": {
                        "description": "Text to be converted to speech. Either this or count_text must be provided.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "example": "A beautiful sunset over mountains"
                    },
                    "count_text": {
                        "description": "Number of characters for price calculation. Either this or text must be provided.",
                        "type": [
                            "integer",
                            "null"
                        ],
                        "example": 1000
                    },
                    "model": {
                        "description": "The model to use for speech generation. Available models can be retrieved via the GET /api/v2/models endpoint.",
                        "type": "string",
                        "example": "Kokoro"
                    },
                    "mode": {
                        "description": "TTS mode: custom_voice (default), voice_clone, or voice_design.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "example": "custom_voice",
                        "enum": [
                            "custom_voice",
                            "voice_clone",
                            "voice_design",
                            null
                        ]
                    },
                    "voice": {
                        "description": "Name of the voice to be used. Only relevant for custom_voice mode.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "example": "af_sky"
                    },
                    "lang": {
                        "description": "Language to be used during audio generation",
                        "type": "string",
                        "example": "en-us"
                    },
                    "speed": {
                        "description": "Generated audio speech speed",
                        "type": "number",
                        "example": 1
                    },
                    "format": {
                        "description": "Audio output format. Read `info.limits.output_formats` for your `model` from `GET /api/v2/models` and send one of the listed values; anything else is rejected with 422.",
                        "type": "string",
                        "example": "mp3"
                    },
                    "sample_rate": {
                        "description": "Sample rate of generated audio",
                        "type": "number",
                        "example": 24000
                    },
                    "instruct": {
                        "description": "Natural language voice description for voice_design mode price calculation.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "example": "Read this in a calm, measured tone"
                    },
                    "ref_audio": {
                        "description": "Optional on the quote (`mode: voice_clone`). When sent, held to the model's `info.limits.min_ref_audio_duration` / `max_ref_audio_duration` exactly as on generation, so a quote cannot succeed for a reference the job rejects.",
                        "type": "string",
                        "format": "binary"
                    }
                },
                "type": "object"
            },
            "Txt2EmbeddingPriceRequestBody": {
                "required": [
                    "input",
                    "model"
                ],
                "properties": {
                    "input": {
                        "description": "Input text(s) to generate embeddings for. Can be a single string or array of strings (max 2048 items). Each input limited to 8192 tokens, total request limited to 300k tokens.",
                        "oneOf": [
                            {
                                "type": "string",
                                "example": "This is a sample text for embedding generation."
                            },
                            {
                                "type": "array",
                                "items": {
                                    "type": "string"
                                },
                                "example": [
                                    "First text for embedding",
                                    "Second text for embedding"
                                ]
                            }
                        ]
                    },
                    "model": {
                        "description": "The embedding model to use. Available models can be retrieved via the GET /api/v2/models endpoint.",
                        "type": "string",
                        "example": "Bge_M3_FP16"
                    }
                },
                "type": "object"
            },
            "Txt2VideoPriceRequestBody": {
                "description": "Every example in this schema is a working set for the `model` example shown — they are not defaults and not portable. Sizes, step counts, frame counts and frame rates are all per-model: read `info.limits` and `info.defaults` for the model you actually intend to use from `GET /api/v2/models`. Substituting a different `model` while keeping these values is the most common source of a 422.",
                "required": [
                    "model",
                    "width",
                    "height",
                    "frames",
                    "fps"
                ],
                "properties": {
                    "width": {
                        "description": "Width of the generated video in pixels. The accepted range is model-specific — read `info.limits.min_width`/`max_width` and `min_height`/`max_height` for your `model` from `GET /api/v2/models`. Some models also publish `dimension_multiple` or `resolution_step`: values are snapped DOWN to that grid before validation, so an off-grid size is silently reduced rather than rejected. `max_pixels` and `max_ratio`, where present, cap total area and aspect ratio on top of the per-side bounds.",
                        "type": "integer",
                        "example": 512
                    },
                    "height": {
                        "description": "Height of the generated video in pixels. The accepted range is model-specific — read `info.limits.min_width`/`max_width` and `min_height`/`max_height` for your `model` from `GET /api/v2/models`. Some models also publish `dimension_multiple` or `resolution_step`: values are snapped DOWN to that grid before validation, so an off-grid size is silently reduced rather than rejected. `max_pixels` and `max_ratio`, where present, cap total area and aspect ratio on top of the per-side bounds.",
                        "type": "integer",
                        "example": 512
                    },
                    "steps": {
                        "description": "Number of inference steps. Bounded by `info.limits.min_steps` / `max_steps` from `GET /api/v2/models` (1–100 when the model declares none). Required when the model declares `info.features.supports_steps: true`; optional when the flag is absent. When the model declares `supports_steps: false` the value is accepted and dropped — it is neither forwarded to the worker nor priced.",
                        "type": "integer",
                        "example": 1
                    },
                    "frames": {
                        "description": "Number of video frames to generate. The accepted range is model-specific — read `info.limits.min_frames`/`max_frames` for your `model` from `GET /api/v2/models`; a value outside it is rejected with 422.",
                        "type": "integer",
                        "example": 120
                    },
                    "fps": {
                        "description": "FPS of the generated video. The model dictates the value: read `info.defaults.fps` for your `model` from `GET /api/v2/models`. Where `min_fps` equals `max_fps` that is the only accepted value; anything outside the range is rejected with 422.",
                        "type": "integer",
                        "example": 30
                    },
                    "model": {
                        "description": "The model to use for video generation. Available models can be retrieved via the GET /api/v2/models endpoint.",
                        "type": "string",
                        "example": "Ltxv_13B_0_9_8_Distilled_FP8"
                    }
                },
                "type": "object"
            },
            "TranscribePriceRequestBody": {
                "description": "Exactly ONE input source per request — `source_url`, `source_file` or `duration_seconds` — hence the three variants below. They are mutually exclusive, not a menu of optional fields: sending two of them is a 422. `platform` belongs to the `duration_seconds` variant alone; with a URL or an upload the platform is derived from the source itself and passing it is rejected. Everything else (`include_ts`, `ts_level`, `include_metadata`, `diarize`, `lang`, `model`) applies to all three.",
                "oneOf": [
                    {
                        "title": "From a source URL",
                        "required": [
                            "source_url",
                            "model"
                        ],
                        "properties": {
                            "source_url": {
                                "description": "URL of video/audio to estimate price for. Mutually exclusive with `source_file` and `duration_seconds`; `platform` must NOT be sent with it, as it is derived from the URL.",
                                "type": "string",
                                "example": "https://www.youtube.com/watch?v=jNQXAC9IVRw"
                            },
                            "include_ts": {
                                "description": "Should transcription include timestamps. Implied when `diarize` is true. Whether it raises the quote depends on `ts_level` — segment-level timing is included in the base price. Pass it exactly as you will pass it to POST /api/v2/audio/transcriptions.",
                                "type": [
                                    "boolean",
                                    "null"
                                ],
                                "example": false,
                                "default": false
                            },
                            "ts_level": {
                                "description": "Timestamp granularity. Validated against the model exactly as on POST /api/v2/audio/transcriptions, so a price quote is never returned for a combination the job request would reject. Granularity affects the price on models that price timestamps separately: `segment` is included in the base price, while `word` and `char` carry a surcharge.",
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "example": "word",
                                "default": "segment",
                                "enum": [
                                    "segment",
                                    "word",
                                    "char",
                                    null
                                ]
                            },
                            "include_metadata": {
                                "description": "Whether the job will be asked to attach source metadata. Carries a flat surcharge on models that price it, so pass it exactly as you will pass it to POST /api/v2/audio/transcriptions or the quote will come in under the amount charged. The surcharge applies only to sources that can actually return metadata: uploads always return null and are never charged for it. Every recognised platform, YouTube included, does return metadata and is charged the surcharge.",
                                "type": [
                                    "boolean",
                                    "null"
                                ],
                                "example": false,
                                "default": false
                            },
                            "diarize": {
                                "description": "Label each timed unit with a detected speaker. Requires a model that supports diarization. Implies `include_ts` and carries the timestamp surcharge at ANY granularity, including `segment`.",
                                "type": [
                                    "boolean",
                                    "null"
                                ],
                                "example": false,
                                "default": false
                            },
                            "lang": {
                                "description": "Language hint for the transcription. Does not affect the price, but is validated against the model the same way as on the job request: a language outside a model's published `info.limits.languages` is rejected.",
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "example": "en",
                                "maxLength": 16
                            },
                            "model": {
                                "description": "The model to use for transcription.",
                                "type": "string",
                                "example": "WhisperLargeV3"
                            }
                        },
                        "type": "object"
                    },
                    {
                        "title": "From an uploaded file",
                        "required": [
                            "source_file",
                            "model"
                        ],
                        "properties": {
                            "source_file": {
                                "description": "Audio or video file to estimate price for. Mutually exclusive with `source_url` and `duration_seconds`; `platform` must NOT be sent with it, as an upload belongs to no platform.",
                                "type": "string",
                                "format": "binary"
                            },
                            "include_ts": {
                                "description": "Should transcription include timestamps. Implied when `diarize` is true. Whether it raises the quote depends on `ts_level` — segment-level timing is included in the base price. Pass it exactly as you will pass it to POST /api/v2/audio/transcriptions.",
                                "type": [
                                    "boolean",
                                    "null"
                                ],
                                "example": false,
                                "default": false
                            },
                            "ts_level": {
                                "description": "Timestamp granularity. Validated against the model exactly as on POST /api/v2/audio/transcriptions, so a price quote is never returned for a combination the job request would reject. Granularity affects the price on models that price timestamps separately: `segment` is included in the base price, while `word` and `char` carry a surcharge.",
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "example": "word",
                                "default": "segment",
                                "enum": [
                                    "segment",
                                    "word",
                                    "char",
                                    null
                                ]
                            },
                            "include_metadata": {
                                "description": "Whether the job will be asked to attach source metadata. An upload always returns null metadata and is never charged the surcharge, so this flag does not move the quote on this variant. Pass it exactly as you will pass it to POST /api/v2/audio/transcriptions.",
                                "type": [
                                    "boolean",
                                    "null"
                                ],
                                "example": false,
                                "default": false
                            },
                            "diarize": {
                                "description": "Label each timed unit with a detected speaker. Requires a model that supports diarization. Implies `include_ts` and carries the timestamp surcharge at ANY granularity, including `segment`.",
                                "type": [
                                    "boolean",
                                    "null"
                                ],
                                "example": false,
                                "default": false
                            },
                            "lang": {
                                "description": "Language hint for the transcription. Does not affect the price, but is validated against the model the same way as on the job request: a language outside a model's published `info.limits.languages` is rejected.",
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "example": "en",
                                "maxLength": 16
                            },
                            "model": {
                                "description": "The model to use for transcription.",
                                "type": "string",
                                "example": "WhisperLargeV3"
                            }
                        },
                        "type": "object"
                    },
                    {
                        "title": "From a known duration",
                        "required": [
                            "duration_seconds",
                            "model"
                        ],
                        "properties": {
                            "duration_seconds": {
                                "description": "Duration in seconds for direct price estimation. Mutually exclusive with `source_url` and `source_file`. This mode never fetches the source, so pass `platform` alongside it on models that price per platform — without it the quote uses the model base rate and no duration rounding, and can come in under the amount charged.",
                                "type": "number",
                                "example": 3600,
                                "minimum": 0.1
                            },
                            "platform": {
                                "description": "The platform the source comes from. Valid ONLY on this variant, where there is no URL to derive it from — with `source_url` or `source_file` it is rejected, because the platform is taken from the source itself. Some models price per platform, and TikTok is priced from a length-band card, so a duration-only quote that omits this is priced at the model base rate and can come in under the amount charged. Pass the platform you will actually submit.",
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "example": "tiktok",
                                "enum": [
                                    "youtube",
                                    "twitter",
                                    "twitch",
                                    "kick",
                                    "tiktok",
                                    null
                                ]
                            },
                            "include_ts": {
                                "description": "Should transcription include timestamps. Implied when `diarize` is true. Whether it raises the quote depends on `ts_level` — segment-level timing is included in the base price. Pass it exactly as you will pass it to POST /api/v2/audio/transcriptions.",
                                "type": [
                                    "boolean",
                                    "null"
                                ],
                                "example": false,
                                "default": false
                            },
                            "ts_level": {
                                "description": "Timestamp granularity. Validated against the model exactly as on POST /api/v2/audio/transcriptions, so a price quote is never returned for a combination the job request would reject. Granularity affects the price on models that price timestamps separately: `segment` is included in the base price, while `word` and `char` carry a surcharge.",
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "example": "word",
                                "default": "segment",
                                "enum": [
                                    "segment",
                                    "word",
                                    "char",
                                    null
                                ]
                            },
                            "include_metadata": {
                                "description": "Whether the job will be asked to attach source metadata. Carries a flat surcharge on models that price it, so pass it exactly as you will pass it to POST /api/v2/audio/transcriptions or the quote will come in under the amount charged. The surcharge applies only to sources that can actually return metadata: uploads always return null and are never charged for it. Every recognised platform, YouTube included, does return metadata and is charged the surcharge.",
                                "type": [
                                    "boolean",
                                    "null"
                                ],
                                "example": false,
                                "default": false
                            },
                            "diarize": {
                                "description": "Label each timed unit with a detected speaker. Requires a model that supports diarization. Implies `include_ts` and carries the timestamp surcharge at ANY granularity, including `segment`.",
                                "type": [
                                    "boolean",
                                    "null"
                                ],
                                "example": false,
                                "default": false
                            },
                            "lang": {
                                "description": "Language hint for the transcription. Does not affect the price, but is validated against the model the same way as on the job request: a language outside a model's published `info.limits.languages` is rejected.",
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "example": "en",
                                "maxLength": 16
                            },
                            "model": {
                                "description": "The model to use for transcription.",
                                "type": "string",
                                "example": "WhisperLargeV3"
                            }
                        },
                        "type": "object"
                    }
                ]
            },
            "Txt2MusicPriceRequestBody": {
                "description": "Every example in this schema is a working set for the `model` example shown — they are not defaults and not portable. Sizes, step counts, frame counts and frame rates are all per-model: read `info.limits` and `info.defaults` for the model you actually intend to use from `GET /api/v2/models`. Substituting a different `model` while keeping these values is the most common source of a 422.",
                "required": [
                    "model",
                    "duration",
                    "inference_steps"
                ],
                "properties": {
                    "model": {
                        "description": "The model to use for music generation. Available models can be retrieved via the GET /api/v2/models endpoint.",
                        "type": "string",
                        "example": "AceStep_1_5_Turbo"
                    },
                    "duration": {
                        "description": "Duration in seconds (10-600). The accepted range is model-specific — read `info.limits.min_duration`/`max_duration` for your `model` from `GET /api/v2/models`. Some models additionally cap duration per output format via `info.limits.max_duration_by_format`.",
                        "type": "number",
                        "example": 30
                    },
                    "inference_steps": {
                        "description": "Number of diffusion inference steps (1-100). Use 8 for turbo models, 32+ for base models. The accepted range is model-specific — read `info.limits.min_steps`/`max_steps` for your `model` from `GET /api/v2/models`; several models pin it to a single value.",
                        "type": "integer",
                        "example": 8
                    },
                    "guidance_scale": {
                        "description": "Optional on the quote. Validated against `info.limits.min_guidance` / `max_guidance` exactly as on generation, so a quote cannot succeed for a value the job rejects.",
                        "type": "number",
                        "example": 1
                    },
                    "bpm": {
                        "description": "Optional on the quote. Validated against `info.limits.min_bpm` / `max_bpm` exactly as on generation.",
                        "type": [
                            "integer",
                            "null"
                        ],
                        "example": 120
                    },
                    "caption": {
                        "description": "Optional on the quote. Validated against `info.limits.min_caption` / `max_caption` (character length) exactly as on generation.",
                        "type": "string",
                        "example": "calm lo-fi beats"
                    },
                    "lyrics": {
                        "description": "Optional on the quote. Validated exactly as on generation when sent.",
                        "type": "string",
                        "example": "[Instrumental]"
                    },
                    "keyscale": {
                        "description": "Optional on the quote. Validated exactly as on generation when sent.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "example": "C major"
                    },
                    "timesignature": {
                        "description": "Optional on the quote. Must be 2, 3, 4, or 6 — validated exactly as on generation when sent.",
                        "type": [
                            "integer",
                            "null"
                        ],
                        "example": 4
                    },
                    "vocal_language": {
                        "description": "Optional on the quote. Validated exactly as on generation when sent.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "example": "en"
                    },
                    "reference_audio": {
                        "description": "Optional on the quote. When sent, held to the model's `info.limits.min_ref_audio_duration` / `max_ref_audio_duration` exactly as on generation.",
                        "type": "string",
                        "format": "binary"
                    }
                },
                "type": "object"
            },
            "VideoDescriptionPriceRequestBody": {
                "description": "Exactly ONE input source per request — `video_url`, `video_file` or `duration_seconds` — hence the three variants below. They are mutually exclusive, not a menu of optional fields: sending two of them is a 422. `platform` belongs to the `duration_seconds` variant alone. `model` and `preset` apply to all three, and are validated exactly as on POST /api/v2/videos/descriptions, so a quote is never returned for a request the job endpoint would reject.",
                "oneOf": [
                    {
                        "title": "From a video URL",
                        "required": [
                            "video_url",
                            "model"
                        ],
                        "properties": {
                            "video_url": {
                                "description": "URL of the video to quote. Mutually exclusive with `video_file` and `duration_seconds`; `platform` must NOT be sent with it, as it is derived from the URL. Quotes from a TikTok URL are refused (the lookup itself costs money) — quote TikTok by `duration_seconds` + `platform: tiktok` instead.",
                                "type": "string",
                                "example": "https://www.youtube.com/watch?v=jNQXAC9IVRw"
                            },
                            "preset": {
                                "description": "The preset you will submit. It sets how much machine time the description takes (`detail` is roughly 3.75× `fast` per hour of material), which is what the price follows; on a TikTok, where the price is a fixed card, it multiplies the card ×0.75 / ×1 / ×1.5 for `fast` / `balanced` / `detail`. Omitted quotes at the model default (`balanced`). Ignored on a model without `info.features.supports_presets`.",
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "example": "balanced",
                                "enum": [
                                    "fast",
                                    "balanced",
                                    "detail",
                                    null
                                ]
                            },
                            "include_metadata": {
                                "description": "Whether the job will ask for source metadata. Carries a flat surcharge on URL sources (an upload always returns null metadata and is never charged), so pass it exactly as you will pass it to POST /api/v2/videos/descriptions.",
                                "type": [
                                    "boolean",
                                    "null"
                                ],
                                "example": false,
                                "default": false
                            },
                            "model": {
                                "description": "The model to use.",
                                "type": "string",
                                "example": "Marlin_2B"
                            }
                        },
                        "type": "object"
                    },
                    {
                        "title": "From an uploaded file",
                        "required": [
                            "video_file",
                            "model"
                        ],
                        "properties": {
                            "video_file": {
                                "description": "Video file to quote. Mutually exclusive with `video_url` and `duration_seconds`. Only the duration is read from it here.",
                                "type": "string",
                                "format": "binary"
                            },
                            "preset": {
                                "description": "The preset you will submit. It sets how much machine time the description takes (`detail` is roughly 3.75× `fast` per hour of material), which is what the price follows; on a TikTok, where the price is a fixed card, it multiplies the card ×0.75 / ×1 / ×1.5 for `fast` / `balanced` / `detail`. Omitted quotes at the model default (`balanced`). Ignored on a model without `info.features.supports_presets`.",
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "example": "balanced",
                                "enum": [
                                    "fast",
                                    "balanced",
                                    "detail",
                                    null
                                ]
                            },
                            "include_metadata": {
                                "description": "Whether the job will ask for source metadata. Carries a flat surcharge on URL sources (an upload always returns null metadata and is never charged), so pass it exactly as you will pass it to POST /api/v2/videos/descriptions.",
                                "type": [
                                    "boolean",
                                    "null"
                                ],
                                "example": false,
                                "default": false
                            },
                            "model": {
                                "description": "The model to use.",
                                "type": "string",
                                "example": "Marlin_2B"
                            }
                        },
                        "type": "object"
                    },
                    {
                        "title": "From a known duration",
                        "required": [
                            "duration_seconds",
                            "model"
                        ],
                        "properties": {
                            "duration_seconds": {
                                "description": "Source duration in seconds. Mutually exclusive with `video_url` and `video_file`. This mode never fetches the source.",
                                "type": "number",
                                "example": 600,
                                "minimum": 0.1
                            },
                            "platform": {
                                "description": "The platform the source comes from. Valid ONLY on this variant, where there is no URL to derive it from — with `video_url` or `video_file` it is rejected. It changes the price: `tiktok` is quoted on the fixed length card (and capped at 10 minutes), every other value on machine time, and `platform` also decides whether `include_metadata` carries its surcharge — only platform sources can return metadata. A duration-only quote that omits it is priced as an upload, so for a URL job it can come in under the amount actually charged.",
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "example": "youtube",
                                "enum": [
                                    "youtube",
                                    "twitter",
                                    "twitch",
                                    "kick",
                                    "tiktok",
                                    null
                                ]
                            },
                            "preset": {
                                "description": "The preset you will submit. It sets how much machine time the description takes (`detail` is roughly 3.75× `fast` per hour of material), which is what the price follows; on a TikTok, where the price is a fixed card, it multiplies the card ×0.75 / ×1 / ×1.5 for `fast` / `balanced` / `detail`. Omitted quotes at the model default (`balanced`). Ignored on a model without `info.features.supports_presets`.",
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "example": "balanced",
                                "enum": [
                                    "fast",
                                    "balanced",
                                    "detail",
                                    null
                                ]
                            },
                            "include_metadata": {
                                "description": "Whether the job will ask for source metadata. Carries a flat surcharge on URL sources (an upload always returns null metadata and is never charged), so pass it exactly as you will pass it to POST /api/v2/videos/descriptions.",
                                "type": [
                                    "boolean",
                                    "null"
                                ],
                                "example": false,
                                "default": false
                            },
                            "model": {
                                "description": "The model to use.",
                                "type": "string",
                                "example": "Marlin_2B"
                            }
                        },
                        "type": "object"
                    }
                ]
            },
            "VideoRemoveBgPriceRequestBody": {
                "description": "Every example in this schema is a working set for the `model` example shown — they are not defaults and not portable. Sizes, step counts, frame counts and frame rates are all per-model: read `info.limits` and `info.defaults` for the model you actually intend to use from `GET /api/v2/models`. Substituting a different `model` while keeping these values is the most common source of a 422.",
                "oneOf": [
                    {
                        "required": [
                            "video",
                            "model"
                        ],
                        "properties": {
                            "video": {
                                "description": "Video file to remove background from. Supported formats: MP4, MPEG, QuickTime, AVI, WMV, OGG. Maximum file size: 10 MB.",
                                "type": "string",
                                "format": "binary"
                            },
                            "model": {
                                "description": "The background removal model to use",
                                "type": "string",
                                "example": "RMBG-1.4"
                            }
                        },
                        "type": "object"
                    },
                    {
                        "required": [
                            "width",
                            "height",
                            "model"
                        ],
                        "properties": {
                            "width": {
                                "description": "Width of video in pixels for price calculation. The accepted range is model-specific — read `info.limits.min_width`/`max_width` and `min_height`/`max_height` for your `model` from `GET /api/v2/models`. Some models also publish `dimension_multiple` or `resolution_step`: values are snapped DOWN to that grid before validation, so an off-grid size is silently reduced rather than rejected. `max_pixels` and `max_ratio`, where present, cap total area and aspect ratio on top of the per-side bounds.",
                                "type": "integer",
                                "example": 1920
                            },
                            "height": {
                                "description": "Height of video in pixels for price calculation. The accepted range is model-specific — read `info.limits.min_width`/`max_width` and `min_height`/`max_height` for your `model` from `GET /api/v2/models`. Some models also publish `dimension_multiple` or `resolution_step`: values are snapped DOWN to that grid before validation, so an off-grid size is silently reduced rather than rejected. `max_pixels` and `max_ratio`, where present, cap total area and aspect ratio on top of the per-side bounds.",
                                "type": "integer",
                                "example": 1080
                            },
                            "model": {
                                "description": "The background removal model to use",
                                "type": "string",
                                "example": "RMBG-1.4"
                            }
                        },
                        "type": "object"
                    }
                ]
            },
            "VideoUpscalePriceRequestBody": {
                "description": "Every example in this schema is a working set for the `model` example shown — they are not defaults and not portable. Sizes, step counts, frame counts and frame rates are all per-model: read `info.limits` and `info.defaults` for the model you actually intend to use from `GET /api/v2/models`. Substituting a different `model` while keeping these values is the most common source of a 422.",
                "oneOf": [
                    {
                        "required": [
                            "video",
                            "model"
                        ],
                        "properties": {
                            "video": {
                                "description": "Video file to upscale. Supported formats: MP4, MPEG, QuickTime, AVI, WMV, OGG. Maximum file size: 10 MB.",
                                "type": "string",
                                "format": "binary"
                            },
                            "model": {
                                "description": "The upscaling model to use",
                                "type": "string",
                                "example": "RealESRGAN_Vid_x4"
                            },
                            "scale": {
                                "description": "Upscale factor. Accepted ONLY by models that publish `info.limits.min_scale`/`max_scale` in `GET /api/v2/models`, and REQUIRED by those models — read them for your `model` before sending. A fixed-scale model (both limits absent or null, e.g. `RealESRGAN_Vid_x4`) rejects this field with a 422; a configurable one rejects its absence. Deliberately carries no example, because no single value is valid across models.",
                                "type": [
                                    "integer",
                                    "null"
                                ],
                                "maximum": 16,
                                "minimum": 1
                            }
                        },
                        "type": "object"
                    },
                    {
                        "required": [
                            "width",
                            "height",
                            "duration",
                            "model"
                        ],
                        "properties": {
                            "width": {
                                "description": "Width of video in pixels for price calculation. The accepted range is model-specific — read `info.limits.min_width`/`max_width` and `min_height`/`max_height` for your `model` from `GET /api/v2/models`. Some models also publish `dimension_multiple` or `resolution_step`: values are snapped DOWN to that grid before validation, so an off-grid size is silently reduced rather than rejected. `max_pixels` and `max_ratio`, where present, cap total area and aspect ratio on top of the per-side bounds.",
                                "type": "integer",
                                "example": 1024
                            },
                            "height": {
                                "description": "Height of video in pixels for price calculation. The accepted range is model-specific — read `info.limits.min_width`/`max_width` and `min_height`/`max_height` for your `model` from `GET /api/v2/models`. Some models also publish `dimension_multiple` or `resolution_step`: values are snapped DOWN to that grid before validation, so an off-grid size is silently reduced rather than rejected. `max_pixels` and `max_ratio`, where present, cap total area and aspect ratio on top of the per-side bounds.",
                                "type": "integer",
                                "example": 576
                            },
                            "duration": {
                                "description": "Video duration in seconds. Required when no `video` file is sent: the price is linear in the number of frames, so a quote cannot be made without it. Its maximum is model-specific — read `info.limits.max_video_duration_seconds` for your `model` from `GET /api/v2/models`; a longer duration is rejected with a 422.",
                                "type": "number",
                                "format": "float",
                                "example": 12.5,
                                "minimum": 0.1
                            },
                            "model": {
                                "description": "The upscaling model to use",
                                "type": "string",
                                "example": "RealESRGAN_Vid_x4"
                            },
                            "scale": {
                                "description": "Upscale factor. Accepted ONLY by models that publish `info.limits.min_scale`/`max_scale` in `GET /api/v2/models`, and REQUIRED by those models — read them for your `model` before sending. A fixed-scale model (both limits absent or null, e.g. `RealESRGAN_Vid_x4`) rejects this field with a 422; a configurable one rejects its absence. Deliberately carries no example, because no single value is valid across models.",
                                "type": [
                                    "integer",
                                    "null"
                                ],
                                "maximum": 16,
                                "minimum": 1
                            }
                        },
                        "type": "object"
                    }
                ]
            },
            "Img2ImgRequestBody": {
                "description": "Every example in this schema is a working set for the `model` example shown — they are not defaults and not portable. Sizes, step counts, frame counts and frame rates are all per-model: read `info.limits` and `info.defaults` for the model you actually intend to use from `GET /api/v2/models`. Substituting a different `model` while keeping these values is the most common source of a 422.\n\nAn input image is MANDATORY and comes in exactly one of two shapes — `image` for a single file, or `images[]` for several. Sending neither is a 422 (\"At least one image is required\"), and sending both is a 422 as well; the `oneOf` below is that choice, not a pair of optional fields. Everything else applies to both shapes.",
                "required": [
                    "prompt",
                    "model",
                    "seed"
                ],
                "properties": {
                    "prompt": {
                        "description": "The main prompt for image generation",
                        "type": "string",
                        "example": "A beautiful sunset over mountains"
                    },
                    "negative_prompt": {
                        "description": "Elements to avoid in the generated image. Dropped (not forwarded to the worker) when the model declares `info.features.supports_negative_prompt: false`.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "example": "blur, darkness, noise"
                    },
                    "image": {
                        "description": "Single source image to edit. Required if \"images[]\" is not provided. Mutually exclusive with \"images[]\". Supported formats: JPG, JPEG, PNG, GIF, BMP, WebP. Maximum file size: 10 MB.",
                        "type": "string",
                        "format": "binary"
                    },
                    "images[]": {
                        "description": "Multiple source images for editing. Maximum count is model-dependent (see model specs max_input_images, defaults to 1), never more than 16. Required if \"image\" is not provided. Mutually exclusive with \"image\". Supported formats: JPG, JPEG, PNG, GIF, BMP, WebP. Maximum file size per image: 10 MB.",
                        "type": "array",
                        "items": {
                            "type": "string",
                            "format": "binary"
                        }
                    },
                    "width": {
                        "description": "Output image width in pixels. Optional - defaults to first input image width if not specified. Subject to model-specific min/max limits. The accepted range is model-specific — read `info.limits.min_width`/`max_width` and `min_height`/`max_height` for your `model` from `GET /api/v2/models`. Some models also publish `dimension_multiple` or `resolution_step`: values are snapped DOWN to that grid before validation, so an off-grid size is silently reduced rather than rejected. `max_pixels` and `max_ratio`, where present, cap total area and aspect ratio on top of the per-side bounds.",
                        "type": [
                            "integer",
                            "null"
                        ],
                        "example": 512
                    },
                    "height": {
                        "description": "Output image height in pixels. Optional - defaults to first input image height if not specified. Subject to model-specific min/max limits. The accepted range is model-specific — read `info.limits.min_width`/`max_width` and `min_height`/`max_height` for your `model` from `GET /api/v2/models`. Some models also publish `dimension_multiple` or `resolution_step`: values are snapped DOWN to that grid before validation, so an off-grid size is silently reduced rather than rejected. `max_pixels` and `max_ratio`, where present, cap total area and aspect ratio on top of the per-side bounds.",
                        "type": [
                            "integer",
                            "null"
                        ],
                        "example": 512
                    },
                    "model": {
                        "description": "The model to use for image editing. Available models can be retrieved via the GET /api/v2/models endpoint.",
                        "type": "string",
                        "example": "QwenImageEdit_Plus_NF4"
                    },
                    "loras": {
                        "description": "Array of LoRA models to apply. Only models that publish a `loras` array in `GET /api/v2/models` have any to apply — the `model` example shown here publishes none, so leave the field out unless you switched to a model that does. Example is deliberately empty: a LoRA name is only valid for the one model that lists it.",
                        "type": "array",
                        "items": {
                            "required": [
                                "name",
                                "weight"
                            ],
                            "properties": {
                                "name": {
                                    "description": "LoRA identifier, copied verbatim from `loras[].name` for your `model` in `GET /api/v2/models`. That is the value the API validates against — not the human-readable `loras[].display_name`.",
                                    "type": "string"
                                },
                                "weight": {
                                    "description": "Weight of the LoRA model (must be non-negative)",
                                    "type": "number",
                                    "minimum": 0
                                }
                            },
                            "type": "object"
                        },
                        "example": []
                    },
                    "guidance": {
                        "description": "Guidance scale. Bounded by `info.limits.min_guidance` / `max_guidance` from `GET /api/v2/models` (0–30 when the model declares none). Required when the model declares `info.features.supports_guidance: true`; optional when the flag is absent. When the model declares `supports_guidance: false` the value is accepted and dropped — it is neither forwarded to the worker nor priced.",
                        "type": "number",
                        "example": 7.5
                    },
                    "steps": {
                        "description": "Number of inference steps. Bounded by `info.limits.min_steps` / `max_steps` from `GET /api/v2/models` (1–100 when the model declares none). Required when the model declares `info.features.supports_steps: true`; optional when the flag is absent. When the model declares `supports_steps: false` the value is accepted and dropped — it is neither forwarded to the worker nor priced.",
                        "type": "integer",
                        "example": 20
                    },
                    "quality": {
                        "description": "Quality tier, for models that support one (e.g. gpt-image: low/medium/high/auto). Only the values listed in that model's available options are accepted; ignored for models without a quality tier. Accepted values are model-specific — read `info.limits.quality_options` for your `model` from `GET /api/v2/models`. A model with an empty or absent list does not support a quality tier and ignores the field.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "example": "medium"
                    },
                    "seed": {
                        "description": "Random seed for generation",
                        "type": "integer",
                        "example": 42
                    },
                    "enhance_prompt": {
                        "description": "When true, the prompt is boosted by the inline prompt booster before generation (async pre-step). Requires a prompt-booster guide configured for the model; the boost fee is billed on the job. Rejected with 422 if no guide exists for the model or the account balance cannot cover the boost fee.",
                        "type": "boolean",
                        "example": false,
                        "default": false
                    },
                    "webhook_url": {
                        "description": "Optional HTTPS URL to receive webhook notifications for job status changes (processing, completed, failed). Must be HTTPS. Max 2048 characters. A per-request URL is self-contained: it is delivered even when the account has no webhook configuration, or the account webhook is disabled. See the `webhooks` block at the top level of this document for the event payloads and the headers each delivery carries.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "uri",
                        "example": "https://your-server.com/webhooks/deapi",
                        "maxLength": 2048
                    },
                    "webhook_secret": {
                        "description": "Optional per-request HMAC secret (min. 32 chars) used to sign the webhook callback. Overrides the account-default secret for this job only. If omitted, the account-default secret signs the callback; if no secret exists at all, the callback is still delivered but UNSIGNED (empty X-DeAPI-Signature header). Requires `webhook_url` to also be set.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "example": "a1b2c3d4e5f60708091a2b3c4d5e6f7081920a1b2c3d4e5f60708091a2b3c4d5",
                        "maxLength": 255,
                        "minLength": 32
                    }
                },
                "type": "object",
                "oneOf": [
                    {
                        "title": "One image",
                        "required": [
                            "image"
                        ],
                        "type": "object"
                    },
                    {
                        "title": "Several images",
                        "required": [
                            "images[]"
                        ],
                        "type": "object"
                    }
                ]
            },
            "Img2TxtRequestBody": {
                "required": [
                    "image",
                    "model"
                ],
                "properties": {
                    "image": {
                        "description": "Image file to extract text from. Supported formats: JPG, JPEG, PNG, GIF, BMP, WebP. Maximum file size: 10 MB.",
                        "type": "string",
                        "format": "binary"
                    },
                    "model": {
                        "description": "The OCR model to use for text extraction",
                        "type": "string",
                        "example": "Nanonets_Ocr_S_F16"
                    },
                    "language": {
                        "description": "Language code for OCR processing (optional)",
                        "type": [
                            "string",
                            "null"
                        ],
                        "example": "en"
                    },
                    "format": {
                        "description": "Output format for extracted text",
                        "type": [
                            "string",
                            "null"
                        ],
                        "example": "text",
                        "enum": [
                            "text",
                            "json",
                            null
                        ]
                    },
                    "return_result_in_response": {
                        "description": "If true, the result will be returned directly in the response instead of only download url. Optional parameter.",
                        "type": [
                            "boolean",
                            "null"
                        ],
                        "example": false,
                        "default": false
                    },
                    "webhook_url": {
                        "description": "Optional HTTPS URL to receive webhook notifications for job status changes (processing, completed, failed). Must be HTTPS. Max 2048 characters. A per-request URL is self-contained: it is delivered even when the account has no webhook configuration, or the account webhook is disabled. See the `webhooks` block at the top level of this document for the event payloads and the headers each delivery carries.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "uri",
                        "example": "https://your-server.com/webhooks/deapi",
                        "maxLength": 2048
                    },
                    "webhook_secret": {
                        "description": "Optional per-request HMAC secret (min. 32 chars) used to sign the webhook callback. Overrides the account-default secret for this job only. If omitted, the account-default secret signs the callback; if no secret exists at all, the callback is still delivered but UNSIGNED (empty X-DeAPI-Signature header). Requires `webhook_url` to also be set.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "example": "a1b2c3d4e5f60708091a2b3c4d5e6f7081920a1b2c3d4e5f60708091a2b3c4d5",
                        "maxLength": 255,
                        "minLength": 32
                    }
                },
                "type": "object"
            },
            "Img2VideoRequestBody": {
                "description": "Every example in this schema is a working set for the `model` example shown — they are not defaults and not portable. Sizes, step counts, frame counts and frame rates are all per-model: read `info.limits` and `info.defaults` for the model you actually intend to use from `GET /api/v2/models`. Substituting a different `model` while keeping these values is the most common source of a 422. Reference inputs (`ref_images`/`ref_videos`/`ref_audios`) are bounded per model too: a model that advertises `supports_image_refs`/`supports_video_refs`/`supports_audio_refs` always publishes the effective `info.limits.max_ref_images`, `max_ref_videos`, `max_ref_audios`, `max_ref_files` (the cap across all three types), `min/max_ref_video_duration`, `min/max_ref_audio_duration` and `min/max_ref_image_ratio` — read them rather than the ceilings quoted on each field, which are only the outer envelope of self-hosted models (never more than 9 / 1 / 3 files and 12 in total; a partner-served model publishes its own, possibly higher, limits). An unsupported type publishes `0`. Every uploaded image, keyframe or reference, must be 64–5000 px per side.",
                "required": [
                    "prompt",
                    "model",
                    "width",
                    "height",
                    "seed",
                    "frames",
                    "fps"
                ],
                "properties": {
                    "prompt": {
                        "description": "The main prompt for video generation",
                        "type": "string",
                        "example": "A beautiful sunset over mountains"
                    },
                    "negative_prompt": {
                        "description": "Elements to avoid in the generated video. Dropped (not forwarded to the worker) when the model declares `info.features.supports_negative_prompt: false`.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "example": "blur, darkness, noise"
                    },
                    "first_frame_image": {
                        "description": "Image for the first frame of video. Required unless reference inputs (`ref_images`/`ref_videos`) are supplied — the two modes are mutually exclusive. Supported formats: JPG, JPEG, PNG, GIF, BMP, WebP. Maximum file size: 10 MB, 64–5000 px per side. Any aspect ratio: a keyframe is fitted to the generation canvas, so the 1:4–4:1 rule that applies to `ref_images` does not apply here.",
                        "type": "string",
                        "format": "binary"
                    },
                    "ref_images": {
                        "description": "Ordered reference images (full-reference mode). **Order is binding**: `ref_images[0]` is\naddressed in the prompt as `<Picture 1>`, `ref_images[1]` as `<Picture 2>`, and so on —\nnumbering is 1-based and counted within images only. Send the parts in index order, or\nindex them explicitly (`ref_images[0]`, `ref_images[1]`, …); the list must start at 0 and\nhave no gaps. Reordering the list rebinds every label in your prompt and produces a\ndifferent video with no error. Mutually exclusive with `first_frame_image`/`last_frame_image`.\nRequires a model whose specs advertise image-reference support; video and audio\nreferences are advertised separately, so a model may accept one type and not another.\nSupported formats: JPG, JPEG, PNG, GIF, BMP, WebP. Maximum file size: 10 MB, 64–5000 px\nper side. Each image must be within a 1:4–4:1 aspect ratio (`info.limits.min_ref_image_ratio`\n/ `max_ref_image_ratio`) — a reference keeps its own aspect, unlike a keyframe, which is\nfitted to the canvas. **The number of entries is model-specific — read\n`info.limits.max_ref_images` for your `model` from `GET /api/v2/models`.** Self-hosted models take at\nmost 9; partner-served models publish their own, possibly higher, limit.",
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string",
                            "format": "binary"
                        }
                    },
                    "ref_videos": {
                        "description": "Ordered reference videos (full-reference mode). `ref_videos[0]` is addressed as `<Video 1>`.\nMutually exclusive with `first_frame_image`/`last_frame_image`. **Count and duration are\nmodel-specific — read `info.limits.max_ref_videos` and `min_ref_video_duration` /\n`max_ref_video_duration` for your `model`.** A model publishing `max_ref_videos: 0` takes no\nvideo references. Defaults are 2–5 seconds.\n\n⚠️ If a reference video carries an audio track, that track occupies `<Audio 1>` and shifts\nevery `ref_audios` entry by one — so with a sounded video, `ref_audios[0]` is `<Audio 2>`,\nnot `<Audio 1>`. The API does not return a label map, so check whether your video has an\naudio track before you write the prompt. Self-hosted models take at most 1; partner-served models\npublish their own limit.",
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string",
                            "format": "binary"
                        }
                    },
                    "ref_audios": {
                        "description": "Ordered reference audio clips (full-reference mode). `ref_audios[0]` is addressed as\n`<Audio 1>` — unless a reference video contributed its own soundtrack first, see\n`ref_videos`. Audio may never be the only reference: at least one `ref_images` or\n`ref_videos` entry is required alongside it. **Count and duration are model-specific — read\n`info.limits.max_ref_audios` and `min_ref_audio_duration` / `max_ref_audio_duration` for your\n`model`.** Defaults are 1–10 seconds. Supported formats: WAV, MP3, FLAC, OGG, M4A. Maximum\nfile size: 15 MB. Self-hosted models take at most 3; partner-served models publish their own limit.",
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string",
                            "format": "binary"
                        }
                    },
                    "last_frame_image": {
                        "description": "Image for the last frame of video (optional). Supported formats: JPG, JPEG, PNG, GIF, BMP, WebP. Maximum file size: 10 MB, 64–5000 px per side, any aspect ratio.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "binary"
                    },
                    "width": {
                        "description": "Width of the generated video in pixels. The accepted range is model-specific — read `info.limits.min_width`/`max_width` and `min_height`/`max_height` for your `model` from `GET /api/v2/models`. Some models also publish `dimension_multiple` or `resolution_step`: values are snapped DOWN to that grid before validation, so an off-grid size is silently reduced rather than rejected. `max_pixels` and `max_ratio`, where present, cap total area and aspect ratio on top of the per-side bounds.",
                        "type": "integer",
                        "example": 512
                    },
                    "height": {
                        "description": "Height of the generated video in pixels. The accepted range is model-specific — read `info.limits.min_width`/`max_width` and `min_height`/`max_height` for your `model` from `GET /api/v2/models`. Some models also publish `dimension_multiple` or `resolution_step`: values are snapped DOWN to that grid before validation, so an off-grid size is silently reduced rather than rejected. `max_pixels` and `max_ratio`, where present, cap total area and aspect ratio on top of the per-side bounds.",
                        "type": "integer",
                        "example": 512
                    },
                    "guidance": {
                        "description": "Guidance scale. Bounded by `info.limits.min_guidance` / `max_guidance` from `GET /api/v2/models` (0–30 when the model declares none). Required when the model declares `info.features.supports_guidance: true`; optional when the flag is absent. When the model declares `supports_guidance: false` the value is accepted and dropped — it is neither forwarded to the worker nor priced.",
                        "type": "number",
                        "example": 7.5
                    },
                    "steps": {
                        "description": "Number of inference steps. Bounded by `info.limits.min_steps` / `max_steps` from `GET /api/v2/models` (1–100 when the model declares none). Required when the model declares `info.features.supports_steps: true`; optional when the flag is absent. When the model declares `supports_steps: false` the value is accepted and dropped — it is neither forwarded to the worker nor priced.",
                        "type": "integer",
                        "example": 1
                    },
                    "frames": {
                        "description": "Number of video frames to generate. The accepted range is model-specific — read `info.limits.min_frames`/`max_frames` for your `model` from `GET /api/v2/models`; a value outside it is rejected with 422.",
                        "type": "integer",
                        "example": 120
                    },
                    "fps": {
                        "description": "FPS of the generated video. The model dictates the value: read `info.defaults.fps` for your `model` from `GET /api/v2/models`. Where `min_fps` equals `max_fps` that is the only accepted value; anything outside the range is rejected with 422.",
                        "type": "integer",
                        "example": 30
                    },
                    "seed": {
                        "description": "Random seed for generation",
                        "type": "integer",
                        "example": 42
                    },
                    "enhance_prompt": {
                        "description": "When true, the prompt is boosted by the inline prompt booster before generation (async pre-step). Requires a prompt-booster guide configured for the model; the boost fee is billed on the job. Rejected with 422 if no guide exists for the model or the account balance cannot cover the boost fee.",
                        "type": "boolean",
                        "example": false,
                        "default": false
                    },
                    "model": {
                        "description": "The model to use for video generation. Available models can be retrieved via the GET /api/v2/models endpoint.",
                        "type": "string",
                        "example": "Ltxv_13B_0_9_8_Distilled_FP8"
                    },
                    "webhook_url": {
                        "description": "Optional HTTPS URL to receive webhook notifications for job status changes (processing, completed, failed). Must be HTTPS. Max 2048 characters. A per-request URL is self-contained: it is delivered even when the account has no webhook configuration, or the account webhook is disabled. See the `webhooks` block at the top level of this document for the event payloads and the headers each delivery carries.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "uri",
                        "example": "https://your-server.com/webhooks/deapi",
                        "maxLength": 2048
                    },
                    "webhook_secret": {
                        "description": "Optional per-request HMAC secret (min. 32 chars) used to sign the webhook callback. Overrides the account-default secret for this job only. If omitted, the account-default secret signs the callback; if no secret exists at all, the callback is still delivered but UNSIGNED (empty X-DeAPI-Signature header). Requires `webhook_url` to also be set.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "example": "a1b2c3d4e5f60708091a2b3c4d5e6f7081920a1b2c3d4e5f60708091a2b3c4d5",
                        "maxLength": 255,
                        "minLength": 32
                    }
                },
                "type": "object",
                "oneOf": [
                    {
                        "required": [
                            "first_frame_image"
                        ],
                        "not": {
                            "anyOf": [
                                {
                                    "required": [
                                        "ref_images"
                                    ],
                                    "properties": {
                                        "ref_images": {
                                            "type": "array"
                                        }
                                    }
                                },
                                {
                                    "required": [
                                        "ref_videos"
                                    ],
                                    "properties": {
                                        "ref_videos": {
                                            "type": "array"
                                        }
                                    }
                                },
                                {
                                    "required": [
                                        "ref_audios"
                                    ],
                                    "properties": {
                                        "ref_audios": {
                                            "type": "array"
                                        }
                                    }
                                }
                            ]
                        }
                    },
                    {
                        "anyOf": [
                            {
                                "required": [
                                    "ref_images"
                                ],
                                "properties": {
                                    "ref_images": {
                                        "type": "array",
                                        "minItems": 1
                                    }
                                }
                            },
                            {
                                "required": [
                                    "ref_videos"
                                ],
                                "properties": {
                                    "ref_videos": {
                                        "type": "array",
                                        "minItems": 1
                                    }
                                }
                            }
                        ],
                        "not": {
                            "anyOf": [
                                {
                                    "required": [
                                        "first_frame_image"
                                    ],
                                    "properties": {
                                        "first_frame_image": {
                                            "type": "string"
                                        }
                                    }
                                },
                                {
                                    "required": [
                                        "last_frame_image"
                                    ],
                                    "properties": {
                                        "last_frame_image": {
                                            "type": "string"
                                        }
                                    }
                                }
                            ]
                        }
                    }
                ]
            },
            "ImageRemoveBgRequestBody": {
                "required": [
                    "image",
                    "model"
                ],
                "properties": {
                    "image": {
                        "description": "Image file to remove background from. Supported formats: JPG, JPEG, PNG, GIF, BMP, WebP. Maximum file size: 10 MB.",
                        "type": "string",
                        "format": "binary"
                    },
                    "model": {
                        "description": "The background removal model to use",
                        "type": "string",
                        "example": "Ben2"
                    },
                    "webhook_url": {
                        "description": "Optional HTTPS URL to receive webhook notifications for job status changes (processing, completed, failed). Must be HTTPS. Max 2048 characters. A per-request URL is self-contained: it is delivered even when the account has no webhook configuration, or the account webhook is disabled. See the `webhooks` block at the top level of this document for the event payloads and the headers each delivery carries.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "uri",
                        "example": "https://your-server.com/webhooks/deapi",
                        "maxLength": 2048
                    },
                    "webhook_secret": {
                        "description": "Optional per-request HMAC secret (min. 32 chars) used to sign the webhook callback. Overrides the account-default secret for this job only. If omitted, the account-default secret signs the callback; if no secret exists at all, the callback is still delivered but UNSIGNED (empty X-DeAPI-Signature header). Requires `webhook_url` to also be set.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "example": "a1b2c3d4e5f60708091a2b3c4d5e6f7081920a1b2c3d4e5f60708091a2b3c4d5",
                        "maxLength": 255,
                        "minLength": 32
                    }
                },
                "type": "object"
            },
            "ImageUpscaleRequestBody": {
                "required": [
                    "image",
                    "model"
                ],
                "properties": {
                    "image": {
                        "description": "Image file to upscale. Supported formats: JPG, JPEG, PNG, GIF, BMP, WebP. Maximum file size: 10 MB.",
                        "type": "string",
                        "format": "binary"
                    },
                    "model": {
                        "description": "The upscaling model to use",
                        "type": "string",
                        "example": "RealESRGAN_x4"
                    },
                    "webhook_url": {
                        "description": "Optional HTTPS URL to receive webhook notifications for job status changes (processing, completed, failed). Must be HTTPS. Max 2048 characters. A per-request URL is self-contained: it is delivered even when the account has no webhook configuration, or the account webhook is disabled. See the `webhooks` block at the top level of this document for the event payloads and the headers each delivery carries.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "uri",
                        "example": "https://your-server.com/webhooks/deapi",
                        "maxLength": 2048
                    },
                    "webhook_secret": {
                        "description": "Optional per-request HMAC secret (min. 32 chars) used to sign the webhook callback. Overrides the account-default secret for this job only. If omitted, the account-default secret signs the callback; if no secret exists at all, the callback is still delivered but UNSIGNED (empty X-DeAPI-Signature header). Requires `webhook_url` to also be set.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "example": "a1b2c3d4e5f60708091a2b3c4d5e6f7081920a1b2c3d4e5f60708091a2b3c4d5",
                        "maxLength": 255,
                        "minLength": 32
                    }
                },
                "type": "object"
            },
            "Txt2AudioRequestBody": {
                "required": [
                    "text",
                    "model",
                    "lang",
                    "speed",
                    "format",
                    "sample_rate"
                ],
                "properties": {
                    "text": {
                        "description": "Text to be converted to speech",
                        "type": "string",
                        "example": "A beautiful sunset over mountains"
                    },
                    "model": {
                        "description": "The model to use for speech generation. Available models can be retrieved via the GET /api/v2/models endpoint.",
                        "type": "string",
                        "example": "Kokoro"
                    },
                    "mode": {
                        "description": "TTS mode: custom_voice (default), voice_clone, or voice_design. Determines which fields are required.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "example": "custom_voice",
                        "enum": [
                            "custom_voice",
                            "voice_clone",
                            "voice_design",
                            null
                        ]
                    },
                    "voice": {
                        "description": "Name of the voice to be used. Required for custom_voice mode.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "example": "af_sky"
                    },
                    "lang": {
                        "description": "Language to be used during audio generation",
                        "type": "string",
                        "example": "en-us"
                    },
                    "speed": {
                        "description": "Generated audio speech speed",
                        "type": "number",
                        "example": 1
                    },
                    "format": {
                        "description": "Audio output format. Read `info.limits.output_formats` for your `model` from `GET /api/v2/models` and send one of the listed values; anything else is rejected with 422.",
                        "type": "string",
                        "example": "mp3"
                    },
                    "sample_rate": {
                        "description": "Sample rate of generated audio",
                        "type": "number",
                        "example": 24000
                    },
                    "ref_audio": {
                        "description": "Reference audio file for voice cloning. Supported formats: mp3, wav, flac, ogg, m4a. Max 10MB. Duration must be between 3-10 seconds (model-specific limits may apply). Required for voice_clone mode.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "binary"
                    },
                    "ref_text": {
                        "description": "Optional transcript of the reference audio for improved voice cloning accuracy.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "example": "Transcript of the reference audio clip"
                    },
                    "instruct": {
                        "description": "Natural language voice description for voice_design mode (e.g. \"A warm female voice with a British accent\"), or style/emotion control in custom_voice mode.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "example": "Read this in a calm, measured tone"
                    },
                    "webhook_url": {
                        "description": "Optional HTTPS URL to receive webhook notifications for job status changes (processing, completed, failed). Must be HTTPS. Max 2048 characters. A per-request URL is self-contained: it is delivered even when the account has no webhook configuration, or the account webhook is disabled. See the `webhooks` block at the top level of this document for the event payloads and the headers each delivery carries.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "uri",
                        "example": "https://your-server.com/webhooks/deapi",
                        "maxLength": 2048
                    },
                    "webhook_secret": {
                        "description": "Optional per-request HMAC secret (min. 32 chars) used to sign the webhook callback. Overrides the account-default secret for this job only. If omitted, the account-default secret signs the callback; if no secret exists at all, the callback is still delivered but UNSIGNED (empty X-DeAPI-Signature header). Requires `webhook_url` to also be set.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "example": "a1b2c3d4e5f60708091a2b3c4d5e6f7081920a1b2c3d4e5f60708091a2b3c4d5",
                        "maxLength": 255,
                        "minLength": 32
                    }
                },
                "type": "object"
            },
            "Txt2EmbeddingRequestBody": {
                "required": [
                    "input",
                    "model"
                ],
                "properties": {
                    "input": {
                        "description": "Input text(s) to generate embeddings for. Can be a single string or array of strings (max 2048 items). Each input limited to 8192 tokens, total request limited to 300k tokens.",
                        "oneOf": [
                            {
                                "type": "string",
                                "example": "This is a sample text for embedding generation."
                            },
                            {
                                "type": "array",
                                "items": {
                                    "type": "string"
                                },
                                "example": [
                                    "First text for embedding",
                                    "Second text for embedding",
                                    "Third text"
                                ]
                            }
                        ]
                    },
                    "model": {
                        "description": "The embedding model to use. Available models can be retrieved via the GET /api/v2/models endpoint.",
                        "type": "string",
                        "example": "Bge_M3_FP16"
                    },
                    "return_result_in_response": {
                        "description": "If true, the embedding result will be returned directly in the response instead of only download url. Optional parameter.",
                        "type": [
                            "boolean",
                            "null"
                        ],
                        "example": false,
                        "default": false
                    },
                    "webhook_url": {
                        "description": "Optional HTTPS URL to receive webhook notifications for job status changes (processing, completed, failed). Must be HTTPS. Max 2048 characters. A per-request URL is self-contained: it is delivered even when the account has no webhook configuration, or the account webhook is disabled. See the `webhooks` block at the top level of this document for the event payloads and the headers each delivery carries.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "uri",
                        "example": "https://your-server.com/webhooks/deapi",
                        "maxLength": 2048
                    },
                    "webhook_secret": {
                        "description": "Optional per-request HMAC secret (min. 32 chars) used to sign the webhook callback. Overrides the account-default secret for this job only. If omitted, the account-default secret signs the callback; if no secret exists at all, the callback is still delivered but UNSIGNED (empty X-DeAPI-Signature header). Requires `webhook_url` to also be set.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "example": "a1b2c3d4e5f60708091a2b3c4d5e6f7081920a1b2c3d4e5f60708091a2b3c4d5",
                        "maxLength": 255,
                        "minLength": 32
                    }
                },
                "type": "object"
            },
            "Txt2ImgRequestBody": {
                "description": "Every example in this schema is a working set for the `model` example shown — they are not defaults and not portable. Sizes, step counts, frame counts and frame rates are all per-model: read `info.limits` and `info.defaults` for the model you actually intend to use from `GET /api/v2/models`. Substituting a different `model` while keeping these values is the most common source of a 422.",
                "required": [
                    "prompt",
                    "model",
                    "width",
                    "height",
                    "seed"
                ],
                "properties": {
                    "prompt": {
                        "description": "The main prompt for image generation",
                        "type": "string",
                        "example": "A beautiful sunset over mountains"
                    },
                    "negative_prompt": {
                        "description": "Elements to avoid in the generated image. Dropped (not forwarded to the worker) when the model declares `info.features.supports_negative_prompt: false`.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "example": "blur, darkness, noise"
                    },
                    "model": {
                        "description": "The model to use for image generation. Available models can be retrieved via the GET /api/v2/models endpoint.",
                        "type": "string",
                        "example": "Flux1schnell"
                    },
                    "loras": {
                        "description": "Array of LoRA models to apply. Accepted only by models that publish a `loras` array in `GET /api/v2/models` — a LoRA not listed for the selected `model` is rejected with a 422. The example below belongs to the `model` example shown and is not portable to another model.",
                        "type": "array",
                        "items": {
                            "required": [
                                "name",
                                "weight"
                            ],
                            "properties": {
                                "name": {
                                    "description": "LoRA identifier, copied verbatim from `loras[].name` for your `model` in `GET /api/v2/models`. That is the value the API validates against — not the human-readable `loras[].display_name`.",
                                    "type": "string",
                                    "example": "PepeFluxSchnellLora"
                                },
                                "weight": {
                                    "description": "Weight of the LoRA model (must be non-negative)",
                                    "type": "number",
                                    "example": 0.75,
                                    "minimum": 0
                                }
                            },
                            "type": "object"
                        }
                    },
                    "width": {
                        "description": "Width of the generated image in pixels. The accepted range is model-specific — read `info.limits.min_width`/`max_width` and `min_height`/`max_height` for your `model` from `GET /api/v2/models`. Some models also publish `dimension_multiple` or `resolution_step`: values are snapped DOWN to that grid before validation, so an off-grid size is silently reduced rather than rejected. `max_pixels` and `max_ratio`, where present, cap total area and aspect ratio on top of the per-side bounds.",
                        "type": "integer",
                        "example": 512
                    },
                    "height": {
                        "description": "Height of the generated image in pixels. The accepted range is model-specific — read `info.limits.min_width`/`max_width` and `min_height`/`max_height` for your `model` from `GET /api/v2/models`. Some models also publish `dimension_multiple` or `resolution_step`: values are snapped DOWN to that grid before validation, so an off-grid size is silently reduced rather than rejected. `max_pixels` and `max_ratio`, where present, cap total area and aspect ratio on top of the per-side bounds.",
                        "type": "integer",
                        "example": 512
                    },
                    "guidance": {
                        "description": "Guidance scale. Bounded by `info.limits.min_guidance` / `max_guidance` from `GET /api/v2/models` (0–30 when the model declares none). Required when the model declares `info.features.supports_guidance: true`; optional when the flag is absent. When the model declares `supports_guidance: false` the value is accepted and dropped — it is neither forwarded to the worker nor priced.",
                        "type": "number",
                        "example": 7.5
                    },
                    "steps": {
                        "description": "Number of inference steps. Bounded by `info.limits.min_steps` / `max_steps` from `GET /api/v2/models` (1–100 when the model declares none). Required when the model declares `info.features.supports_steps: true`; optional when the flag is absent. When the model declares `supports_steps: false` the value is accepted and dropped — it is neither forwarded to the worker nor priced.",
                        "type": "integer",
                        "example": 4
                    },
                    "quality": {
                        "description": "Quality tier, for models that support one (e.g. gpt-image: low/medium/high/auto). Only the values listed in that model's available options are accepted; ignored for models without a quality tier. Accepted values are model-specific — read `info.limits.quality_options` for your `model` from `GET /api/v2/models`. A model with an empty or absent list does not support a quality tier and ignores the field.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "example": "medium"
                    },
                    "seed": {
                        "description": "Random seed for generation",
                        "type": "integer",
                        "example": 42
                    },
                    "enhance_prompt": {
                        "description": "When true, the prompt is boosted by the inline prompt booster before generation (async pre-step). Requires a prompt-booster guide configured for the model; the boost fee is billed on the job. Rejected with 422 if no guide exists for the model or the account balance cannot cover the boost fee.",
                        "type": "boolean",
                        "example": false,
                        "default": false
                    },
                    "webhook_url": {
                        "description": "Optional HTTPS URL to receive webhook notifications for job status changes (processing, completed, failed). Must be HTTPS. Max 2048 characters. A per-request URL is self-contained: it is delivered even when the account has no webhook configuration, or the account webhook is disabled. See the `webhooks` block at the top level of this document for the event payloads and the headers each delivery carries.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "uri",
                        "example": "https://your-server.com/webhooks/deapi",
                        "maxLength": 2048
                    },
                    "webhook_secret": {
                        "description": "Optional per-request HMAC secret (min. 32 chars) used to sign the webhook callback. Overrides the account-default secret for this job only. If omitted, the account-default secret signs the callback; if no secret exists at all, the callback is still delivered but UNSIGNED (empty X-DeAPI-Signature header). Requires `webhook_url` to also be set.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "example": "a1b2c3d4e5f60708091a2b3c4d5e6f7081920a1b2c3d4e5f60708091a2b3c4d5",
                        "maxLength": 255,
                        "minLength": 32
                    }
                },
                "type": "object"
            },
            "Txt2MusicRequestBody": {
                "description": "Every example in this schema is a working set for the `model` example shown — they are not defaults and not portable. Sizes, step counts, frame counts and frame rates are all per-model: read `info.limits` and `info.defaults` for the model you actually intend to use from `GET /api/v2/models`. Substituting a different `model` while keeping these values is the most common source of a 422.",
                "required": [
                    "caption",
                    "model",
                    "lyrics",
                    "duration",
                    "inference_steps",
                    "guidance_scale",
                    "seed",
                    "format"
                ],
                "properties": {
                    "caption": {
                        "description": "Text description of the music to generate",
                        "type": "string",
                        "example": "upbeat electronic dance music with energetic synths"
                    },
                    "model": {
                        "description": "The model to use for music generation. Available models can be retrieved via the GET /api/v2/models endpoint.",
                        "type": "string",
                        "example": "AceStep_1_5_Turbo"
                    },
                    "lyrics": {
                        "description": "Lyrics for the music. Use \"[Instrumental]\" for instrumental tracks without vocals.",
                        "type": "string",
                        "example": "[Instrumental]"
                    },
                    "duration": {
                        "description": "Duration in seconds (10-600). The accepted range is model-specific — read `info.limits.min_duration`/`max_duration` for your `model` from `GET /api/v2/models`. Some models additionally cap duration per output format via `info.limits.max_duration_by_format`.",
                        "type": "number",
                        "example": 30
                    },
                    "bpm": {
                        "description": "Beats per minute (30-300)",
                        "type": [
                            "integer",
                            "null"
                        ],
                        "example": 120
                    },
                    "keyscale": {
                        "description": "Musical key/scale (e.g. \"C major\", \"F# minor\")",
                        "type": [
                            "string",
                            "null"
                        ],
                        "example": "C major"
                    },
                    "timesignature": {
                        "description": "Time signature. Must be 2, 3, 4, or 6.",
                        "type": [
                            "integer",
                            "null"
                        ],
                        "example": 4
                    },
                    "vocal_language": {
                        "description": "Language code for vocals (e.g. \"en\", \"es\", \"fr\")",
                        "type": [
                            "string",
                            "null"
                        ],
                        "example": "en"
                    },
                    "inference_steps": {
                        "description": "Number of diffusion inference steps (1-100). Use 8 for turbo models, 32+ for base models. The accepted range is model-specific — read `info.limits.min_steps`/`max_steps` for your `model` from `GET /api/v2/models`; several models pin it to a single value.",
                        "type": "integer",
                        "example": 8
                    },
                    "guidance_scale": {
                        "description": "Classifier-free guidance scale. The accepted range is model-specific — read `info.limits.min_guidance` / `max_guidance` for your `model` from `GET /api/v2/models`. Several models pin it to a single value (AceStep_1_5_Turbo accepts only 1), so a value outside that range is rejected with 422.",
                        "type": "number",
                        "example": 1
                    },
                    "seed": {
                        "description": "Random seed. Use -1 for random.",
                        "type": "integer",
                        "example": -1
                    },
                    "format": {
                        "description": "Audio output format. Read `info.limits.output_formats` for your `model` from `GET /api/v2/models` and send one of the listed values; anything else is rejected with 422.",
                        "type": "string",
                        "example": "mp3"
                    },
                    "reference_audio": {
                        "description": "Optional reference audio file for style transfer. Supported formats: mp3, wav, flac, ogg, m4a. Max size configurable (default 10MB). Duration must be within model-specific limits.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "binary"
                    },
                    "webhook_url": {
                        "description": "Optional HTTPS URL to receive webhook notifications for job status changes (processing, completed, failed). Must be HTTPS. Max 2048 characters. A per-request URL is self-contained: it is delivered even when the account has no webhook configuration, or the account webhook is disabled. See the `webhooks` block at the top level of this document for the event payloads and the headers each delivery carries.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "uri",
                        "example": "https://your-server.com/webhooks/deapi",
                        "maxLength": 2048
                    },
                    "webhook_secret": {
                        "description": "Optional per-request HMAC secret (min. 32 chars) used to sign the webhook callback. Overrides the account-default secret for this job only. If omitted, the account-default secret signs the callback; if no secret exists at all, the callback is still delivered but UNSIGNED (empty X-DeAPI-Signature header). Requires `webhook_url` to also be set.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "example": "a1b2c3d4e5f60708091a2b3c4d5e6f7081920a1b2c3d4e5f60708091a2b3c4d5",
                        "maxLength": 255,
                        "minLength": 32
                    }
                },
                "type": "object"
            },
            "Txt2VideoRequestBody": {
                "description": "Every example in this schema is a working set for the `model` example shown — they are not defaults and not portable. Sizes, step counts, frame counts and frame rates are all per-model: read `info.limits` and `info.defaults` for the model you actually intend to use from `GET /api/v2/models`. Substituting a different `model` while keeping these values is the most common source of a 422.",
                "required": [
                    "prompt",
                    "model",
                    "width",
                    "height",
                    "seed",
                    "frames",
                    "fps"
                ],
                "properties": {
                    "prompt": {
                        "description": "The main prompt for video generation",
                        "type": "string",
                        "example": "A beautiful sunset over mountains"
                    },
                    "negative_prompt": {
                        "description": "Elements to avoid in the generated video. Dropped (not forwarded to the worker) when the model declares `info.features.supports_negative_prompt: false`.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "example": "blur, darkness, noise"
                    },
                    "width": {
                        "description": "Width of the generated video in pixels. The accepted range is model-specific — read `info.limits.min_width`/`max_width` and `min_height`/`max_height` for your `model` from `GET /api/v2/models`. Some models also publish `dimension_multiple` or `resolution_step`: values are snapped DOWN to that grid before validation, so an off-grid size is silently reduced rather than rejected. `max_pixels` and `max_ratio`, where present, cap total area and aspect ratio on top of the per-side bounds.",
                        "type": "integer",
                        "example": 512
                    },
                    "height": {
                        "description": "Height of the generated video in pixels. The accepted range is model-specific — read `info.limits.min_width`/`max_width` and `min_height`/`max_height` for your `model` from `GET /api/v2/models`. Some models also publish `dimension_multiple` or `resolution_step`: values are snapped DOWN to that grid before validation, so an off-grid size is silently reduced rather than rejected. `max_pixels` and `max_ratio`, where present, cap total area and aspect ratio on top of the per-side bounds.",
                        "type": "integer",
                        "example": 512
                    },
                    "guidance": {
                        "description": "Guidance scale. Bounded by `info.limits.min_guidance` / `max_guidance` from `GET /api/v2/models` (0–30 when the model declares none). Required when the model declares `info.features.supports_guidance: true`; optional when the flag is absent. When the model declares `supports_guidance: false` the value is accepted and dropped — it is neither forwarded to the worker nor priced.",
                        "type": "number",
                        "example": 7.5
                    },
                    "steps": {
                        "description": "Number of inference steps. Bounded by `info.limits.min_steps` / `max_steps` from `GET /api/v2/models` (1–100 when the model declares none). Required when the model declares `info.features.supports_steps: true`; optional when the flag is absent. When the model declares `supports_steps: false` the value is accepted and dropped — it is neither forwarded to the worker nor priced.",
                        "type": "integer",
                        "example": 1
                    },
                    "frames": {
                        "description": "Number of video frames to generate. The accepted range is model-specific — read `info.limits.min_frames`/`max_frames` for your `model` from `GET /api/v2/models`; a value outside it is rejected with 422.",
                        "type": "integer",
                        "example": 120
                    },
                    "fps": {
                        "description": "FPS of the generated video. The model dictates the value: read `info.defaults.fps` for your `model` from `GET /api/v2/models`. Where `min_fps` equals `max_fps` that is the only accepted value; anything outside the range is rejected with 422.",
                        "type": "integer",
                        "example": 30
                    },
                    "seed": {
                        "description": "Random seed for generation",
                        "type": "integer",
                        "example": 42
                    },
                    "enhance_prompt": {
                        "description": "When true, the prompt is boosted by the inline prompt booster before generation (async pre-step). Requires a prompt-booster guide configured for the model; the boost fee is billed on the job. Rejected with 422 if no guide exists for the model or the account balance cannot cover the boost fee.",
                        "type": "boolean",
                        "example": false,
                        "default": false
                    },
                    "model": {
                        "description": "The model to use for video generation. Available models can be retrieved via the GET /api/v2/models endpoint.",
                        "type": "string",
                        "example": "Ltxv_13B_0_9_8_Distilled_FP8"
                    },
                    "webhook_url": {
                        "description": "Optional HTTPS URL to receive webhook notifications for job status changes (processing, completed, failed). Must be HTTPS. Max 2048 characters. A per-request URL is self-contained: it is delivered even when the account has no webhook configuration, or the account webhook is disabled. See the `webhooks` block at the top level of this document for the event payloads and the headers each delivery carries.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "uri",
                        "example": "https://your-server.com/webhooks/deapi",
                        "maxLength": 2048
                    },
                    "webhook_secret": {
                        "description": "Optional per-request HMAC secret (min. 32 chars) used to sign the webhook callback. Overrides the account-default secret for this job only. If omitted, the account-default secret signs the callback; if no secret exists at all, the callback is still delivered but UNSIGNED (empty X-DeAPI-Signature header). Requires `webhook_url` to also be set.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "example": "a1b2c3d4e5f60708091a2b3c4d5e6f7081920a1b2c3d4e5f60708091a2b3c4d5",
                        "maxLength": 255,
                        "minLength": 32
                    }
                },
                "type": "object"
            },
            "TranscribeRequestBody": {
                "description": "A source is MANDATORY and comes in exactly one of two shapes — `source_url` for a hosted video/audio, or `source_file` for an upload. Sending neither is a 422, and sending both is a 422 as well; the `oneOf` below is that choice, not a pair of optional fields. Everything else applies to both. The `/price` twin of this endpoint accepts a third shape, `duration_seconds`, which this one does not.",
                "required": [
                    "model"
                ],
                "properties": {
                    "source_url": {
                        "description": "URL of video/audio to transcribe (YouTube, Twitter/X, Twitch, Kick, TikTok, Twitter Spaces). Mutually exclusive with source_file.",
                        "type": "string",
                        "example": "https://www.youtube.com/watch?v=jNQXAC9IVRw"
                    },
                    "source_file": {
                        "description": "Audio or video file to transcribe. Supported audio: aac, mpeg, ogg, wav, webm, flac. Supported video: mp4, mpeg, quicktime, avi, wmv, ogg. Mutually exclusive with source_url.",
                        "type": "string",
                        "format": "binary"
                    },
                    "include_ts": {
                        "description": "Should transcription include timestamps. Implied when `diarize` is true. Segment-level timestamps are included in the base price — see `ts_level`.",
                        "type": [
                            "boolean",
                            "null"
                        ],
                        "example": false,
                        "default": false
                    },
                    "ts_level": {
                        "description": "Timestamp granularity. Only applies when `include_ts` is true, otherwise ignored. Granularity affects the price on models that price timestamps separately: `segment` is included in the base price, while `word` and `char` carry a surcharge. The levels a model offers are published as `info.limits.timestamp_levels` by GET /api/v2/models; requesting an unsupported level is rejected.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "example": "word",
                        "default": "segment",
                        "enum": [
                            "segment",
                            "word",
                            "char",
                            null
                        ]
                    },
                    "diarize": {
                        "description": "Label each timed unit with a detected speaker. Requires a model whose `info.features.supports_diarization` is true, and implies `include_ts`. Carries the timestamp surcharge at ANY granularity, including `segment`.",
                        "type": [
                            "boolean",
                            "null"
                        ],
                        "example": false,
                        "default": false
                    },
                    "lang": {
                        "description": "Language hint for the transcription, e.g. `en` or `pl`. Region subtags are stripped (`en-us` becomes `en`), and `auto` means auto-detect. Omit to auto-detect. When a model publishes `info.limits.languages` via GET /api/v2/models, requesting a language outside that list is rejected; a model publishing no such list accepts any value.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "example": "en",
                        "maxLength": 16
                    },
                    "model": {
                        "description": "The model to use for transcription. Available models can be retrieved via the GET /api/v2/models endpoint.",
                        "type": "string",
                        "example": "WhisperLargeV3"
                    },
                    "include_metadata": {
                        "description": "If true, the job-status response carries a `metadata` object describing the source — title, channel, uploader, upload date and engagement counts such as views, likes and comments. Only URL sources have any; an uploaded file returns null. YouTube resolves through the official Data API and returns a smaller block — id, title, channel, description, duration_seconds, extractor, view_count, like_count — because that API has no equivalent for the rest; the field names match the other platforms. Fields absent on a platform are null rather than omitted. On models that price metadata this carries a flat surcharge, charged only on sources that can return it — an upload, which has no source to describe, is never charged for the flag.",
                        "type": [
                            "boolean",
                            "null"
                        ],
                        "example": false,
                        "default": false
                    },
                    "return_result_in_response": {
                        "description": "If true, the result will be returned directly in the response instead of only download url.",
                        "type": [
                            "boolean",
                            "null"
                        ],
                        "example": false,
                        "default": false
                    },
                    "webhook_url": {
                        "description": "Optional HTTPS URL to receive webhook notifications for job status changes (processing, completed, failed). Must be HTTPS. Max 2048 characters. A per-request URL is self-contained: it is delivered even when the account has no webhook configuration, or the account webhook is disabled. See the `webhooks` block at the top level of this document for the event payloads and the headers each delivery carries.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "uri",
                        "example": "https://your-server.com/webhooks/deapi",
                        "maxLength": 2048
                    },
                    "webhook_secret": {
                        "description": "Optional per-request HMAC secret (min. 32 chars) used to sign the webhook callback. Overrides the account-default secret for this job only. If omitted, the account-default secret signs the callback; if no secret exists at all, the callback is still delivered but UNSIGNED (empty X-DeAPI-Signature header). Requires `webhook_url` to also be set.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "example": "a1b2c3d4e5f60708091a2b3c4d5e6f7081920a1b2c3d4e5f60708091a2b3c4d5",
                        "maxLength": 255,
                        "minLength": 32
                    }
                },
                "type": "object",
                "oneOf": [
                    {
                        "title": "From a source URL",
                        "required": [
                            "source_url"
                        ],
                        "type": "object"
                    },
                    {
                        "title": "From an uploaded file",
                        "required": [
                            "source_file"
                        ],
                        "type": "object"
                    }
                ]
            },
            "VideoDescriptionRequestBody": {
                "description": "A source is MANDATORY and comes in exactly one of two shapes — `video_url` for a hosted video, or `video_file` for an upload. Sending neither is a 422, and sending both is a 422 as well; the `oneOf` below is that choice, not a pair of optional fields. Everything else applies to both. The `/price` twin of this endpoint accepts a third shape, `duration_seconds`, which this one does not.",
                "required": [
                    "model"
                ],
                "properties": {
                    "video_url": {
                        "description": "URL of the video to describe (YouTube, Twitter/X, Twitch, Kick, TikTok — the same platforms as transcription). Audio-only sources such as Twitter Spaces are rejected. Live streams are rejected. Mutually exclusive with video_file.",
                        "type": "string",
                        "example": "https://www.youtube.com/watch?v=jNQXAC9IVRw"
                    },
                    "video_file": {
                        "description": "Video file to describe. Supported: mp4, mpeg, quicktime, avi, wmv, ogg, webm, mkv. Must contain a video stream. Mutually exclusive with video_url.",
                        "type": "string",
                        "format": "binary"
                    },
                    "model": {
                        "description": "The model to use. Available models can be retrieved via the GET /api/v2/models endpoint; a model lists `video2desc` (URL sources) and/or `video_file2desc` (uploads) in its `inference_types`. Its `info.limits.max_video_duration_seconds`, when present, is the longest source it accepts.",
                        "type": "string",
                        "example": "Marlin_2B"
                    },
                    "preset": {
                        "description": "Detail level. A preset is the per-frame pixel budget the model reads the video at: `fast` reads a small frame over long windows, `detail` a large frame over short windows, so higher presets read more of what is on screen (small text, brand names) and cost more — roughly ×1 / ×1.7 / ×3.75 machine time for `fast` / `balanced` / `detail` (×0.75 / ×1 / ×1.5 on the TikTok card). Omit for the default (`balanced`, or the cheapest preset the model offers if it does not offer `balanced`). Only honoured on a model whose `info.features.supports_presets` is true; such a model publishes the presets it offers as `info.limits.available_presets` and rejects any other. On a model without the flag the field is ignored.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "example": "balanced",
                        "enum": [
                            "fast",
                            "balanced",
                            "detail",
                            null
                        ]
                    },
                    "include_metadata": {
                        "description": "If true, the job-status response carries a `metadata` object describing the source — title, channel, uploader, upload date and engagement counts such as views, likes and comments — exactly as on POST /api/v2/audio/transcriptions. Only URL sources have any; an uploaded file returns null and is never charged for the flag. Carries the same flat surcharge as transcription metadata.",
                        "type": [
                            "boolean",
                            "null"
                        ],
                        "example": false,
                        "default": false
                    },
                    "return_result_in_response": {
                        "description": "If true, the completed job-status response includes the description as a serialized JSON string in `data.result`, in addition to `data.result_url`. Parse the string as JSON to read `events`, `scenes` and `meta`.",
                        "type": [
                            "boolean",
                            "null"
                        ],
                        "example": false,
                        "default": false
                    },
                    "webhook_url": {
                        "description": "Optional HTTPS URL to receive webhook notifications for job status changes (processing, completed, failed). Must be HTTPS. Max 2048 characters. A per-request URL is self-contained: it is delivered even when the account has no webhook configuration, or the account webhook is disabled. See the `webhooks` block at the top level of this document for the event payloads and the headers each delivery carries.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "uri",
                        "example": "https://your-server.com/webhooks/deapi",
                        "maxLength": 2048
                    },
                    "webhook_secret": {
                        "description": "Optional per-request HMAC secret (min. 32 chars) used to sign the webhook callback. Overrides the account-default secret for this job only. If omitted, the account-default secret signs the callback; if no secret exists at all, the callback is still delivered but UNSIGNED (empty X-DeAPI-Signature header). Requires `webhook_url` to also be set.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "example": "a1b2c3d4e5f60708091a2b3c4d5e6f7081920a1b2c3d4e5f60708091a2b3c4d5",
                        "maxLength": 255,
                        "minLength": 32
                    }
                },
                "type": "object",
                "oneOf": [
                    {
                        "title": "From a video URL",
                        "required": [
                            "video_url"
                        ],
                        "type": "object"
                    },
                    {
                        "title": "From an uploaded file",
                        "required": [
                            "video_file"
                        ],
                        "type": "object"
                    }
                ]
            },
            "VideoRemoveBgRequestBody": {
                "required": [
                    "video",
                    "model"
                ],
                "properties": {
                    "video": {
                        "description": "Video file to remove background from. Supported formats: MP4, MPEG, QuickTime, AVI, WMV, OGG. Maximum file size: 10 MB.",
                        "type": "string",
                        "format": "binary"
                    },
                    "model": {
                        "description": "The background removal model to use",
                        "type": "string",
                        "example": "RMBG-1.4"
                    },
                    "webhook_url": {
                        "description": "Optional HTTPS URL to receive webhook notifications for job status changes (processing, completed, failed). Must be HTTPS. Max 2048 characters. A per-request URL is self-contained: it is delivered even when the account has no webhook configuration, or the account webhook is disabled. See the `webhooks` block at the top level of this document for the event payloads and the headers each delivery carries.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "uri",
                        "example": "https://your-server.com/webhooks/deapi",
                        "maxLength": 2048
                    },
                    "webhook_secret": {
                        "description": "Optional per-request HMAC secret (min. 32 chars) used to sign the webhook callback. Overrides the account-default secret for this job only. If omitted, the account-default secret signs the callback; if no secret exists at all, the callback is still delivered but UNSIGNED (empty X-DeAPI-Signature header). Requires `webhook_url` to also be set.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "example": "a1b2c3d4e5f60708091a2b3c4d5e6f7081920a1b2c3d4e5f60708091a2b3c4d5",
                        "maxLength": 255,
                        "minLength": 32
                    }
                },
                "type": "object"
            },
            "VideoUpscaleRequestBody": {
                "required": [
                    "video",
                    "model"
                ],
                "properties": {
                    "video": {
                        "description": "Video file to upscale. Supported formats: MP4, MPEG, QuickTime, AVI, WMV, OGG. Maximum file size: 10 MB.",
                        "type": "string",
                        "format": "binary"
                    },
                    "model": {
                        "description": "The upscaling model to use",
                        "type": "string",
                        "example": "RealESRGAN_Vid_x4"
                    },
                    "scale": {
                        "description": "Upscale factor. Accepted ONLY by models that publish `info.limits.min_scale`/`max_scale` in `GET /api/v2/models`, and REQUIRED by those models — read them for your `model` before sending. A fixed-scale model (both limits absent or null, e.g. `RealESRGAN_Vid_x4`) rejects this field with a 422; a configurable one rejects its absence. Deliberately carries no example, because no single value is valid across models.",
                        "type": [
                            "integer",
                            "null"
                        ],
                        "maximum": 16,
                        "minimum": 1
                    },
                    "webhook_url": {
                        "description": "Optional HTTPS URL to receive webhook notifications for job status changes (processing, completed, failed). Must be HTTPS. Max 2048 characters. A per-request URL is self-contained: it is delivered even when the account has no webhook configuration, or the account webhook is disabled. See the `webhooks` block at the top level of this document for the event payloads and the headers each delivery carries.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "uri",
                        "example": "https://your-server.com/webhooks/deapi",
                        "maxLength": 2048
                    },
                    "webhook_secret": {
                        "description": "Optional per-request HMAC secret (min. 32 chars) used to sign the webhook callback. Overrides the account-default secret for this job only. If omitted, the account-default secret signs the callback; if no secret exists at all, the callback is still delivered but UNSIGNED (empty X-DeAPI-Signature header). Requires `webhook_url` to also be set.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "example": "a1b2c3d4e5f60708091a2b3c4d5e6f7081920a1b2c3d4e5f60708091a2b3c4d5",
                        "maxLength": 255,
                        "minLength": 32
                    }
                },
                "type": "object"
            },
            "AccountBilling": {
                "required": [
                    "balance",
                    "currency",
                    "auto_top_up"
                ],
                "properties": {
                    "balance": {
                        "description": "Remaining balance.",
                        "type": "number",
                        "format": "float",
                        "example": 42.17
                    },
                    "currency": {
                        "type": "string",
                        "example": "USD"
                    },
                    "auto_top_up": {
                        "$ref": "#/components/schemas/AutoTopUp"
                    }
                },
                "type": "object"
            },
            "AutoTopUp": {
                "required": [
                    "enabled",
                    "threshold",
                    "amount"
                ],
                "properties": {
                    "enabled": {
                        "description": "On for this account and available on the platform.",
                        "type": "boolean",
                        "example": true
                    },
                    "threshold": {
                        "description": "The balance below which a top-up is charged.",
                        "type": "number",
                        "format": "float",
                        "example": 2
                    },
                    "amount": {
                        "description": "The balance a top-up brings the account to; null when not set up.",
                        "type": [
                            "number",
                            "null"
                        ],
                        "format": "float",
                        "example": 25
                    }
                },
                "type": "object"
            },
            "ApiKeyResource": {
                "required": [
                    "id",
                    "name",
                    "preview",
                    "role",
                    "status",
                    "created_at",
                    "expires_at",
                    "last_used_at",
                    "ip_whitelist",
                    "ip_whitelist_count",
                    "limit",
                    "reset_interval",
                    "limit_used",
                    "limit_remaining",
                    "limit_resets_at"
                ],
                "properties": {
                    "id": {
                        "description": "Key id. The secret is never returned here — only once, by `POST /api/v2/keys`.",
                        "type": "integer",
                        "example": 42
                    },
                    "name": {
                        "type": "string",
                        "example": "Production backend"
                    },
                    "preview": {
                        "description": "Key id and the last characters of the secret, for recognising a key.",
                        "type": "string",
                        "example": "sk-dp-42-...f3a"
                    },
                    "role": {
                        "description": "`api` — inference and the key's own data; `admin` — also account billing and key management.",
                        "type": "string",
                        "example": "api",
                        "enum": [
                            "api",
                            "admin"
                        ]
                    },
                    "status": {
                        "type": "string",
                        "example": "active",
                        "enum": [
                            "active",
                            "revoked",
                            "expired"
                        ],
                        "description": "`revoked` — disabled in the Dashboard or with `PATCH /api/v2/keys/{id}` (`active: false`); `expired` — past `expires_at`."
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "example": "2026-09-22T10:00:00+00:00"
                    },
                    "expires_at": {
                        "description": "Null when the key does not expire.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "example": null
                    },
                    "last_used_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "example": "2026-09-22T11:30:00+00:00"
                    },
                    "ip_whitelist": {
                        "$ref": "#/components/schemas/ApiKeyIpWhitelist"
                    },
                    "ip_whitelist_count": {
                        "description": "How many entries the list holds — `0` means the key works from any address.",
                        "type": "integer",
                        "example": 2,
                        "minimum": 0
                    },
                    "limit": {
                        "$ref": "#/components/schemas/ApiKeySpendLimit"
                    },
                    "reset_interval": {
                        "description": "How often the spend limit starts over. `none` while the key has no limit, and for a limit that never resets.",
                        "type": "string",
                        "example": "monthly",
                        "enum": [
                            "none",
                            "daily",
                            "weekly",
                            "monthly"
                        ]
                    },
                    "limit_used": {
                        "description": "Spent against the limit in the window running now, in USD. Null when the key has no limit — nothing is counted for a key without one. Not the same figure as `GET /api/v2/keys/{id}/usage`, which sums what the key spent over the period you ask for: this counts only what went through the ceiling since the current window opened.",
                        "type": [
                            "number",
                            "null"
                        ],
                        "format": "float",
                        "example": 41.25
                    },
                    "limit_remaining": {
                        "description": "What is left of the limit in this window, in USD; null when there is no limit. Never negative — a cost settled after the work was admitted can put the counter over the ceiling, and the key then simply accepts nothing more until the window resets.",
                        "type": [
                            "number",
                            "null"
                        ],
                        "format": "float",
                        "example": 58.75
                    },
                    "limit_resets_at": {
                        "description": "When the counter next starts over. Null when the key has no limit, and null when it has one that never resets (`reset_interval: none`). Windows are anchored on the key's creation instant, not the calendar: a key created on the 15th at 13:42 UTC resets on the 15th at 13:42.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "example": "2026-10-22T10:00:00+00:00"
                    }
                },
                "type": "object"
            },
            "ApiKeySpendLimit": {
                "description": "What this key may spend per window, in USD. Null means no limit, which is what every key carries until one is set. `0` is a real value and means the key accepts no paid work at all. A limit is a ceiling, not a reservation: it holds nothing against the account balance, and the limits of an account's keys may add up to far more than the account has. Sending `null` removes the limit; because nothing is counted for a key without one, removing a limit and setting it again inside the same window starts the counter from zero.",
                "type": [
                    "number",
                    "null"
                ],
                "format": "float",
                "example": 100,
                "maximum": 999999.999999,
                "minimum": 0
            },
            "ApiKeyCollection": {
                "required": [
                    "data",
                    "links",
                    "meta"
                ],
                "properties": {
                    "data": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/ApiKeyResource"
                        }
                    },
                    "links": {
                        "properties": {
                            "first": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "uri",
                                "example": "https://api.deapi.ai/api/v2/keys?page=1"
                            },
                            "last": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "uri",
                                "example": "https://api.deapi.ai/api/v2/keys?page=1"
                            },
                            "prev": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "uri",
                                "example": null
                            },
                            "next": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "uri",
                                "example": null
                            }
                        },
                        "type": "object"
                    },
                    "meta": {
                        "properties": {
                            "current_page": {
                                "type": "integer",
                                "example": 1
                            },
                            "from": {
                                "type": [
                                    "integer",
                                    "null"
                                ],
                                "example": 1
                            },
                            "last_page": {
                                "type": "integer",
                                "example": 1
                            },
                            "path": {
                                "type": "string",
                                "format": "uri",
                                "example": "https://api.deapi.ai/api/v2/keys"
                            },
                            "per_page": {
                                "type": "integer",
                                "example": 50
                            },
                            "to": {
                                "type": [
                                    "integer",
                                    "null"
                                ],
                                "example": 2
                            },
                            "total": {
                                "type": "integer",
                                "example": 2
                            }
                        },
                        "type": "object"
                    }
                },
                "type": "object"
            },
            "AudioToVideoInferenceJobResource": {
                "properties": {
                    "data": {
                        "description": "Job settings data",
                        "properties": {
                            "job_id": {
                                "description": "Unique job identifier",
                                "type": "string"
                            },
                            "model": {
                                "description": "Model name used for generation",
                                "type": "string"
                            },
                            "prompt": {
                                "description": "The main prompt for video generation",
                                "type": "string",
                                "example": "A beautiful sunset over mountains with dramatic music"
                            },
                            "negative_prompt": {
                                "description": "Elements to avoid in the generated video",
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "example": "blur, darkness, noise"
                            },
                            "audio": {
                                "description": "Base64-encoded audio file for audio conditioning",
                                "type": "string",
                                "format": "binary"
                            },
                            "first_frame_image": {
                                "description": "Base64-encoded image for the first frame of video",
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "binary"
                            },
                            "last_frame_image": {
                                "description": "Base64-encoded image for the last frame of video",
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "binary"
                            },
                            "width": {
                                "description": "Width of the generated video in pixels",
                                "type": "integer",
                                "example": 512
                            },
                            "height": {
                                "description": "Height of the generated video in pixels",
                                "type": "integer",
                                "example": 512
                            },
                            "guidance": {
                                "description": "Guidance scale for the generation",
                                "type": "number",
                                "example": 7.5
                            },
                            "steps": {
                                "description": "Number of inference steps",
                                "type": "integer",
                                "example": 50
                            },
                            "frames": {
                                "description": "Number of video frames to generate",
                                "type": "integer",
                                "example": 97
                            },
                            "fps": {
                                "description": "FPS of generated video",
                                "type": "integer",
                                "example": 24
                            },
                            "seed": {
                                "description": "Random seed for generation",
                                "type": "integer",
                                "example": 42
                            }
                        },
                        "type": "object"
                    }
                },
                "type": "object"
            },
            "ClientDiffusionModelResource": {
                "properties": {
                    "name": {
                        "description": "Human-readable name, for display. Not accepted by any endpoint — send `slug`.",
                        "type": "string",
                        "example": "Flux.1 Schnell"
                    },
                    "slug": {
                        "description": "The model identifier. This is the value to send as `model` (or `model_slug` on the prompt booster) in every request; the endpoints match on it exactly and reject anything else with 422.",
                        "type": "string",
                        "example": "Flux1schnell"
                    },
                    "inference_types": {
                        "description": "Inference types this model serves. A flat array of type slugs — use it to decide which endpoints accept the model.",
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "example": [
                            "txt2img",
                            "img2img"
                        ]
                    },
                    "tags": {
                        "description": "Controlled labels for this model (e.g. test, experimental, new, beta).",
                        "type": "array",
                        "items": {
                            "type": "string",
                            "enum": [
                                "test",
                                "experimental",
                                "new",
                                "beta"
                            ]
                        }
                    },
                    "status": {
                        "description": "Model maturity: test_model for externally-provided models, standard_model for native fleet models.",
                        "type": "string",
                        "enum": [
                            "test_model",
                            "standard_model"
                        ]
                    },
                    "info": {
                        "description": "Model specifications including limits, features, and defaults. Structure varies by model type. Audio models (txt2audio, txt2music) additionally carry `limits.output_formats` — the only formats this model may be asked to return, enforced with a 422 — and `defaults.format`, the suggested pick. Note `format` is required on the generation endpoints: `defaults.format` is a hint for building a UI or a client wrapper, never a server-side fallback. Read `output_formats` instead of assuming a fixed list: `wav` is disabled on most models because uncompressed audio at longer durations exceeds the result-upload limit. Music models also carry `limits.max_duration_by_format` — the longest `duration` (seconds) whose result file still fits the upload limit in each enabled format; the effective maximum is the lower of it and `limits.max_duration`. A model advertising reference-input support (`features.supports_image_refs` / `supports_video_refs` / `supports_audio_refs`, img2video) always carries the effective `limits.max_ref_images`, `max_ref_videos`, `max_ref_audios`, `max_ref_files`, `min/max_ref_video_duration`, `min/max_ref_audio_duration` and `min/max_ref_image_ratio` — already clamped to what the worker accepts, `0` for an unsupported type — so they can be read without a fallback.",
                        "type": "object",
                        "example": {
                            "limits": {
                                "min_width": 256,
                                "max_width": 2048,
                                "min_height": 256,
                                "max_height": 2048,
                                "min_steps": 1,
                                "max_steps": 10,
                                "resolution_step": 128
                            },
                            "features": {
                                "supports_steps": true,
                                "supports_guidance": false,
                                "supports_negative_prompt": true
                            },
                            "defaults": {
                                "width": 768,
                                "height": 768,
                                "steps": 4,
                                "negative_prompt": "Negative prompt"
                            }
                        },
                        "additionalProperties": true
                    },
                    "loras": {
                        "description": "Available LoRA models for this diffusion model. Only present when the model supports LoRA and has LoRA models available.",
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "$ref": "#/components/schemas/ClientLoraResource"
                        }
                    },
                    "languages": {
                        "description": "Available languages and voices for this model. Only present for TTS models that support multiple languages.",
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "$ref": "#/components/schemas/ClientLanguageResource"
                        }
                    }
                },
                "type": "object"
            },
            "ClientDiffusionModelCollection": {
                "required": [
                    "data",
                    "links",
                    "meta"
                ],
                "properties": {
                    "data": {
                        "description": "List of available models",
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/ClientDiffusionModelResource"
                        }
                    },
                    "links": {
                        "description": "Absolute URLs for navigating the result set. `prev` is null on the first page and `next` is null on the last.",
                        "properties": {
                            "first": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "uri",
                                "example": "https://api.deapi.ai/api/v2/models?page=1"
                            },
                            "last": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "uri",
                                "example": "https://api.deapi.ai/api/v2/models?page=3"
                            },
                            "prev": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "uri",
                                "example": null
                            },
                            "next": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "uri",
                                "example": "https://api.deapi.ai/api/v2/models?page=2"
                            }
                        },
                        "type": "object"
                    },
                    "meta": {
                        "description": "Pagination counters. Note `per_page` here is the page size that was APPLIED — it echoes the `limit` query parameter, which is the one you send.",
                        "properties": {
                            "current_page": {
                                "type": "integer",
                                "example": 1
                            },
                            "from": {
                                "type": [
                                    "integer",
                                    "null"
                                ],
                                "example": 1
                            },
                            "last_page": {
                                "type": "integer",
                                "example": 2
                            },
                            "links": {
                                "description": "Per-page navigation entries, including the \"Previous\" and \"Next\" labels.",
                                "type": "array",
                                "items": {
                                    "properties": {
                                        "url": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "label": {
                                            "type": "string",
                                            "example": "1"
                                        },
                                        "page": {
                                            "type": [
                                                "integer",
                                                "null"
                                            ],
                                            "example": 1
                                        },
                                        "active": {
                                            "type": "boolean",
                                            "example": true
                                        }
                                    },
                                    "type": "object"
                                }
                            },
                            "path": {
                                "type": "string",
                                "format": "uri",
                                "example": "https://api.deapi.ai/api/v2/models"
                            },
                            "per_page": {
                                "type": "integer",
                                "example": 25
                            },
                            "to": {
                                "type": [
                                    "integer",
                                    "null"
                                ],
                                "example": 25
                            },
                            "total": {
                                "type": "integer",
                                "example": 30
                            }
                        },
                        "type": "object"
                    }
                },
                "type": "object"
            },
            "ClientInfoResource": {
                "properties": {
                    "data": {
                        "description": "Account information",
                        "properties": {
                            "balance": {
                                "description": "Remaining balance, in the same credit unit that `price` is quoted and charged in across the API. Compare it against a `/price` quote before submitting work.",
                                "type": "number",
                                "format": "double",
                                "example": 19.72
                            }
                        },
                        "type": "object"
                    }
                },
                "type": "object"
            },
            "ClientLanguageResource": {
                "properties": {
                    "name": {
                        "description": "Language display name",
                        "type": "string"
                    },
                    "slug": {
                        "description": "Language identifier slug",
                        "type": "string"
                    },
                    "voices": {
                        "description": "Available voices for this language",
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/ClientVoiceResource"
                        }
                    }
                },
                "type": "object"
            },
            "ClientLoraResource": {
                "properties": {
                    "display_name": {
                        "description": "Human friendly Lora name",
                        "type": "string"
                    },
                    "name": {
                        "description": "Lora name",
                        "type": "string"
                    }
                },
                "type": "object"
            },
            "ClientVoiceResource": {
                "properties": {
                    "name": {
                        "description": "Voice display name",
                        "type": "string"
                    },
                    "slug": {
                        "description": "Voice identifier slug",
                        "type": "string"
                    },
                    "gender": {
                        "description": "Voice gender classification",
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "type": "object"
            },
            "CreatedApiKeyResource": {
                "required": [
                    "id",
                    "name",
                    "preview",
                    "role",
                    "status",
                    "created_at",
                    "expires_at",
                    "last_used_at",
                    "ip_whitelist",
                    "ip_whitelist_count",
                    "limit",
                    "reset_interval",
                    "limit_used",
                    "limit_remaining",
                    "limit_resets_at",
                    "secret"
                ],
                "properties": {
                    "id": {
                        "description": "Key id.",
                        "type": "integer",
                        "example": 43
                    },
                    "name": {
                        "type": "string",
                        "example": "Customer 1234"
                    },
                    "preview": {
                        "type": "string",
                        "example": "sk-dp-43-...9bc"
                    },
                    "role": {
                        "type": "string",
                        "example": "api",
                        "enum": [
                            "api"
                        ]
                    },
                    "status": {
                        "type": "string",
                        "example": "active",
                        "enum": [
                            "active"
                        ]
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "example": "2026-09-22T12:00:00+00:00"
                    },
                    "expires_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "example": null
                    },
                    "last_used_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "example": null
                    },
                    "ip_whitelist": {
                        "$ref": "#/components/schemas/ApiKeyIpWhitelist"
                    },
                    "ip_whitelist_count": {
                        "type": "integer",
                        "example": 2,
                        "minimum": 0
                    },
                    "limit": {
                        "$ref": "#/components/schemas/ApiKeySpendLimit"
                    },
                    "reset_interval": {
                        "description": "How often the spend limit starts over. `none` when no limit was set.",
                        "type": "string",
                        "example": "monthly",
                        "enum": [
                            "none",
                            "daily",
                            "weekly",
                            "monthly"
                        ]
                    },
                    "limit_used": {
                        "description": "Always `0` on a key that was just created, and null when it was created without a limit.",
                        "type": [
                            "number",
                            "null"
                        ],
                        "format": "float",
                        "example": 0
                    },
                    "limit_remaining": {
                        "description": "The whole limit on a key that was just created; null when it has none.",
                        "type": [
                            "number",
                            "null"
                        ],
                        "format": "float",
                        "example": 100
                    },
                    "limit_resets_at": {
                        "description": "One window after the key was created. Null when there is no limit or it never resets.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "example": "2026-10-22T12:00:00+00:00"
                    },
                    "secret": {
                        "description": "The full key for the `Authorization: Bearer` header. Returned only in this response — store it now, it cannot be read again.",
                        "type": "string",
                        "example": "sk-dp-43-kx8…"
                    }
                },
                "type": "object"
            },
            "ImageToImageInferenceJobResource": {
                "properties": {
                    "data": {
                        "description": "Job settings data",
                        "properties": {
                            "job_id": {
                                "description": "Unique job identifier",
                                "type": "string"
                            },
                            "model": {
                                "description": "Model name used for generation",
                                "type": "string"
                            },
                            "prompt": {
                                "description": "The main prompt for image generation",
                                "type": "string",
                                "example": "A beautiful sunset over mountains"
                            },
                            "negative_prompt": {
                                "description": "Elements to avoid in the generated image",
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "example": "blur, darkness, noise"
                            },
                            "image": {
                                "description": "First source image (base64 encoded, for backward compatibility)",
                                "type": "string",
                                "format": "binary"
                            },
                            "images": {
                                "description": "Array of source images with metadata",
                                "type": "array",
                                "items": {
                                    "properties": {
                                        "data": {
                                            "description": "Base64 encoded image data",
                                            "type": "string",
                                            "format": "binary"
                                        },
                                        "width": {
                                            "description": "Width of the source image in pixels",
                                            "type": "integer",
                                            "example": 512
                                        },
                                        "height": {
                                            "description": "Height of the source image in pixels",
                                            "type": "integer",
                                            "example": 512
                                        }
                                    },
                                    "type": "object"
                                }
                            },
                            "width": {
                                "description": "Width of the output image in pixels",
                                "type": "integer",
                                "example": 512
                            },
                            "height": {
                                "description": "Height of the output image in pixels",
                                "type": "integer",
                                "example": 512
                            },
                            "guidance": {
                                "description": "Guidance scale for the generation",
                                "type": "number",
                                "example": 7.5
                            },
                            "steps": {
                                "description": "Number of inference steps",
                                "type": "integer",
                                "example": 20
                            },
                            "seed": {
                                "description": "Random seed for generation",
                                "type": "integer",
                                "example": 42
                            },
                            "loras": {
                                "description": "Array of LoRA models applied",
                                "type": "array",
                                "items": {
                                    "required": [
                                        "name",
                                        "weight"
                                    ],
                                    "properties": {
                                        "name": {
                                            "description": "Name of the LoRA model",
                                            "type": "string"
                                        },
                                        "weight": {
                                            "description": "Weight of the LoRA model (0-1)",
                                            "type": "number",
                                            "format": "float",
                                            "maximum": 1,
                                            "minimum": 0
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        },
                        "type": "object"
                    }
                },
                "type": "object"
            },
            "ImageToVideoInferenceJobResource": {
                "properties": {
                    "data": {
                        "description": "Job settings data",
                        "properties": {
                            "job_id": {
                                "description": "Unique job identifier",
                                "type": "string"
                            },
                            "model": {
                                "description": "Model name used for generation",
                                "type": "string"
                            },
                            "prompt": {
                                "description": "The main prompt for video generation",
                                "type": "string",
                                "example": "A beautiful sunset over mountains"
                            },
                            "negative_prompt": {
                                "description": "Elements to avoid in the generated video",
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "example": "blur, darkness, noise"
                            },
                            "first_frame_image": {
                                "description": "Image for the first frame of video",
                                "type": "string",
                                "format": "binary"
                            },
                            "last_frame_image": {
                                "description": "Image for the last frame of video",
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "binary"
                            },
                            "width": {
                                "description": "Width of the generated video in pixels",
                                "type": "integer",
                                "example": 512
                            },
                            "height": {
                                "description": "Height of the generated video in pixels",
                                "type": "integer",
                                "example": 512
                            },
                            "guidance": {
                                "description": "Guidance scale for the generation",
                                "type": "number",
                                "example": 7.5
                            },
                            "steps": {
                                "description": "Number of inference steps",
                                "type": "integer",
                                "example": 20
                            },
                            "frames": {
                                "description": "Number of video frames to generate",
                                "type": "integer",
                                "example": 20
                            },
                            "fps": {
                                "description": "FPS of generated video",
                                "type": "integer",
                                "example": 20
                            },
                            "seed": {
                                "description": "Random seed for generation",
                                "type": "integer",
                                "example": 42
                            }
                        },
                        "type": "object"
                    }
                },
                "type": "object"
            },
            "JobRequestResponseResource": {
                "required": [
                    "data"
                ],
                "properties": {
                    "data": {
                        "description": "Information from success endpoint",
                        "required": [
                            "request_id"
                        ],
                        "properties": {
                            "request_id": {
                                "description": "UUID identifying the created inference request. Pass it to `GET /api/v2/jobs/{job_request}` to poll status and collect the result.",
                                "type": "string",
                                "format": "uuid",
                                "example": "c08a339c-73e5-4d67-a4d5-231302fbff9a"
                            }
                        },
                        "type": "object"
                    }
                },
                "type": "object"
            },
            "JobRequestStatusResource": {
                "properties": {
                    "data": {
                        "description": "Status response data",
                        "properties": {
                            "status": {
                                "description": "Current status of the job request",
                                "type": "string",
                                "enum": [
                                    "pending",
                                    "processing",
                                    "done",
                                    "error"
                                ]
                            },
                            "preview": {
                                "description": "In-progress preview, as supplied by the worker and passed through unchanged — treat it as an opaque string rather than assuming a URL. Present only while a worker is reporting progress, and cached for one hour, so it is normally null once status is done.",
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "result_url": {
                                "description": "URL to the result file (for example, an image, audio, or a video-description JSON document). Only available when status is done.",
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "example": "https://example.com/results/image.jpg"
                            },
                            "results_alt_formats": {
                                "description": "Alternative format URLs for the result (jpg, webp). Only available for image-producing job types when status is done",
                                "properties": {
                                    "jpg": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "example": "https://example.com/results/image.jpg"
                                    },
                                    "webp": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "example": "https://example.com/results/image.webp"
                                    }
                                },
                                "type": [
                                    "object",
                                    "null"
                                ]
                            },
                            "result": {
                                "description": "Generated text, available when status is done. For video descriptions requested with `return_result_in_response: true`, this is a serialized JSON string containing `events`, `scenes` and `meta`; parse it as JSON.",
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "example": "https://example.com/results/image.jpg"
                            },
                            "metadata": {
                                "description": "Source metadata captured for the job — populated only when the original request set `include_metadata: true` and the source actually carried any, otherwise null. Shape depends on the source, so read it defensively.",
                                "type": [
                                    "object",
                                    "null"
                                ]
                            },
                            "progress": {
                                "description": "Current progress of the job (0.0 to 100.0)",
                                "type": "number",
                                "format": "float",
                                "example": 45.5,
                                "maximum": 100,
                                "minimum": 0
                            },
                            "error_code": {
                                "description": "Category of the failure. Only present when status is error.",
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "enum": [
                                    "WORKER_TIMEOUT",
                                    "WORKER_ERROR",
                                    "PROCESSING_ERROR",
                                    null
                                ]
                            },
                            "error_reason": {
                                "description": "Bounded, actionable failure reason. Only present when status is error. SOURCE_PRIVATE: the source is private, deleted or otherwise unavailable to us. SOURCE_RESTRICTED: an age or region gate blocks it. SOURCE_UNPROCESSABLE: the source was fetched but the media is unusable (no audio track, corrupt, unsupported codec). SOURCE_DOWNLOAD_FAILED: the source should be reachable but this attempt failed to fetch it — frequently transient. INPUT_TOO_LARGE: the request exceeds the model limits. TIMEOUT: the job exceeded its time budget. CAPACITY_UNAVAILABLE: our fleet failed to complete it; not your request. PROCESSING_FAILED: ran and failed for a reason we could not classify. THIS LIST IS OPEN — new values may be added without a major version, so treat any value you do not recognise as PROCESSING_FAILED. Prefer branching on `retryable` over matching these individually.",
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "example": "SOURCE_DOWNLOAD_FAILED"
                            },
                            "retryable": {
                                "description": "Whether resubmitting the identical request could plausibly succeed. Only present when status is error. Branch on this rather than on `error_reason` — it stays correct as new reasons are added.",
                                "type": [
                                    "boolean",
                                    "null"
                                ],
                                "example": true
                            },
                            "refunded": {
                                "description": "Whether the upfront charge for this job was returned. Only present when status is error. False means no refund was issued, which covers both a charge deliberately kept and a job that failed before it was ever charged.",
                                "type": [
                                    "boolean",
                                    "null"
                                ],
                                "example": true
                            },
                            "failed_at": {
                                "description": "ISO 8601 timestamp of when the job terminally failed, mirroring the webhook. Only present when status is error.",
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time",
                                "example": "2026-06-16T09:30:00+00:00"
                            },
                            "price": {
                                "description": "What this request cost you, in credits. Present only once the request is terminal (done or error); null while it is still running. A refunded request reports 0. For models served by an external provider the charge is settled after inference, so until it settles this is the estimate quoted at submission and `is_estimated` is true — the settled charge can differ from it. Own-fleet models are charged up front and always report the exact figure.",
                                "properties": {
                                    "amount": {
                                        "description": "Credits charged for this request",
                                        "type": "number",
                                        "format": "float",
                                        "example": 0.0234
                                    },
                                    "is_estimated": {
                                        "description": "True when the figure is the submission-time estimate rather than a settled charge. Do not use an estimated value for reconciliation or invoicing.",
                                        "type": "boolean",
                                        "example": false
                                    }
                                },
                                "type": [
                                    "object",
                                    "null"
                                ]
                            },
                            "prompt_boosted": {
                                "description": "Whether the prompt was enhanced by the inline prompt booster (enhance_prompt)",
                                "type": "boolean",
                                "example": true
                            },
                            "prompt_boost": {
                                "description": "Boosted and original prompts. Non-null only when prompt_boosted is true (i.e. the boost actually ran); null while the boost is still queued or if it was not requested",
                                "properties": {
                                    "prompt": {
                                        "description": "Effective (boosted) prompt used for generation",
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "example": "Serene mountain lake at sunrise, 85mm lens, f/2.8, tranquil atmosphere"
                                    },
                                    "prompt_original": {
                                        "description": "Original prompt supplied by the client",
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "example": "a serene mountain lake at sunrise"
                                    },
                                    "negative_prompt": {
                                        "description": "Effective (boosted) negative prompt",
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "example": "blurry, low quality"
                                    },
                                    "negative_prompt_original": {
                                        "description": "Original negative prompt supplied by the client",
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "example": "ugly"
                                    }
                                },
                                "type": [
                                    "object",
                                    "null"
                                ]
                            }
                        },
                        "type": "object"
                    }
                },
                "type": "object"
            },
            "LoraResource": {
                "properties": {
                    "name": {
                        "description": "Lora name",
                        "type": "string"
                    },
                    "slug": {
                        "description": "Lora slug",
                        "type": "string"
                    }
                },
                "type": "object"
            },
            "PaymentResource": {
                "required": [
                    "id",
                    "amount",
                    "currency",
                    "status",
                    "provider",
                    "created_at"
                ],
                "properties": {
                    "id": {
                        "description": "Payment id.",
                        "type": "integer",
                        "example": 1201
                    },
                    "amount": {
                        "description": "In the currency's main unit.",
                        "type": "number",
                        "format": "float",
                        "example": 25
                    },
                    "currency": {
                        "type": "string",
                        "example": "USD"
                    },
                    "status": {
                        "type": "string",
                        "example": "paid",
                        "enum": [
                            "pending",
                            "paid",
                            "disputed",
                            "cancelled",
                            "failed",
                            "expired"
                        ]
                    },
                    "provider": {
                        "type": "string",
                        "example": "Stripe"
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "example": "2026-09-20T09:15:00+00:00"
                    }
                },
                "type": "object"
            },
            "PaymentCollection": {
                "required": [
                    "data",
                    "links",
                    "meta"
                ],
                "properties": {
                    "data": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/PaymentResource"
                        }
                    },
                    "links": {
                        "properties": {
                            "first": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "uri",
                                "example": "https://api.deapi.ai/api/v2/account/payments?page=1"
                            },
                            "last": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "uri",
                                "example": "https://api.deapi.ai/api/v2/account/payments?page=1"
                            },
                            "prev": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "uri",
                                "example": null
                            },
                            "next": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "uri",
                                "example": null
                            }
                        },
                        "type": "object"
                    },
                    "meta": {
                        "properties": {
                            "current_page": {
                                "type": "integer",
                                "example": 1
                            },
                            "from": {
                                "type": [
                                    "integer",
                                    "null"
                                ],
                                "example": 1
                            },
                            "last_page": {
                                "type": "integer",
                                "example": 1
                            },
                            "path": {
                                "type": "string",
                                "format": "uri",
                                "example": "https://api.deapi.ai/api/v2/account/payments"
                            },
                            "per_page": {
                                "type": "integer",
                                "example": 50
                            },
                            "to": {
                                "type": [
                                    "integer",
                                    "null"
                                ],
                                "example": 2
                            },
                            "total": {
                                "type": "integer",
                                "example": 2
                            }
                        },
                        "type": "object"
                    }
                },
                "type": "object"
            },
            "TextToVideoInferenceJobResource": {
                "properties": {
                    "data": {
                        "description": "Job settings data",
                        "properties": {
                            "job_id": {
                                "description": "Unique job identifier",
                                "type": "string"
                            },
                            "model": {
                                "description": "Model name used for generation",
                                "type": "string"
                            },
                            "prompt": {
                                "description": "The main prompt for video generation",
                                "type": "string",
                                "example": "A beautiful sunset over mountains"
                            },
                            "negative_prompt": {
                                "description": "Elements to avoid in the generated video",
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "example": "blur, darkness, noise"
                            },
                            "width": {
                                "description": "Width of the generated video in pixels",
                                "type": "integer",
                                "example": 512
                            },
                            "height": {
                                "description": "Height of the generated video in pixels",
                                "type": "integer",
                                "example": 512
                            },
                            "guidance": {
                                "description": "Guidance scale for the generation",
                                "type": "number",
                                "example": 7.5
                            },
                            "steps": {
                                "description": "Number of inference steps",
                                "type": "integer",
                                "example": 20
                            },
                            "frames": {
                                "description": "Number of video frames to generate",
                                "type": "integer",
                                "example": 20
                            },
                            "fps": {
                                "description": "FPS of generated video",
                                "type": "integer",
                                "example": 20
                            },
                            "seed": {
                                "description": "Random seed for generation",
                                "type": "integer",
                                "example": 42
                            }
                        },
                        "type": "object"
                    }
                },
                "type": "object"
            },
            "TranscriptionInferenceJobResource": {
                "properties": {
                    "data": {
                        "description": "Job settings data",
                        "properties": {
                            "job_id": {
                                "description": "Unique job identifier",
                                "type": "string"
                            },
                            "model": {
                                "description": "Model slug the job must be run with",
                                "type": "string"
                            },
                            "video_url": {
                                "description": "URL of the video to transcribe. Present for URL-sourced video jobs only.",
                                "type": "string"
                            },
                            "audio_url": {
                                "description": "URL of the audio to transcribe. Present for URL-sourced audio jobs only.",
                                "type": "string"
                            },
                            "file_url": {
                                "description": "Presigned download for the uploaded media. Present for file-sourced jobs only.",
                                "type": "string"
                            },
                            "include_ts": {
                                "description": "Whether the transcription should carry timestamps",
                                "type": "boolean"
                            },
                            "ts_level": {
                                "description": "Timestamp granularity: segment, word or char. Omitted on jobs predating this field, in which case the inference server default applies.",
                                "type": "string",
                                "enum": [
                                    "segment",
                                    "word",
                                    "char"
                                ]
                            },
                            "diarize": {
                                "description": "Whether speaker labels were requested",
                                "type": "boolean"
                            },
                            "lang": {
                                "description": "Requested source language, or null to auto-detect",
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "download": {
                                "description": "A ready-to-fetch CDN link, present when the source was extracted through a proxy (TikTok). When present, fetch this URL with these cookies and do NOT run yt-dlp — for TikTok the yt-dlp path is what gets worker IPs banned, and a failed fetch must be reported rather than retried that way. Absent for every other source.",
                                "properties": {
                                    "url": {
                                        "type": "string"
                                    },
                                    "cookies": {
                                        "description": "Send all of these. The CDN gates the link on them, and the set is bound to this exact URL.",
                                        "type": "object",
                                        "additionalProperties": {
                                            "type": "string"
                                        }
                                    }
                                },
                                "type": [
                                    "object",
                                    "null"
                                ]
                            }
                        },
                        "type": "object"
                    }
                },
                "type": "object"
            },
            "Txt2MusicInferenceJobResource": {
                "properties": {
                    "data": {
                        "description": "Job settings data",
                        "properties": {
                            "job_id": {
                                "description": "Unique job identifier",
                                "type": "string"
                            },
                            "model": {
                                "description": "Model name used for music generation",
                                "type": "string"
                            },
                            "caption": {
                                "description": "Text description of the music",
                                "type": "string"
                            },
                            "lyrics": {
                                "description": "Lyrics for the music",
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "duration": {
                                "description": "Duration in seconds",
                                "type": "number"
                            },
                            "bpm": {
                                "description": "Beats per minute",
                                "type": [
                                    "integer",
                                    "null"
                                ]
                            },
                            "keyscale": {
                                "description": "Musical key/scale",
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "timesignature": {
                                "description": "Time signature",
                                "type": [
                                    "integer",
                                    "null"
                                ]
                            },
                            "vocal_language": {
                                "description": "Language for vocals",
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "inference_steps": {
                                "description": "Number of inference steps",
                                "type": "integer"
                            },
                            "guidance_scale": {
                                "description": "Guidance scale",
                                "type": "number"
                            },
                            "seed": {
                                "description": "Random seed",
                                "type": "integer"
                            },
                            "format": {
                                "description": "Audio output format",
                                "type": "string",
                                "example": "flac"
                            },
                            "reference_audio": {
                                "description": "Presigned URL for reference audio file (when provided)",
                                "type": [
                                    "string",
                                    "null"
                                ]
                            }
                        },
                        "type": "object"
                    }
                },
                "type": "object"
            },
            "VideoUpscaleInferenceJobResource": {
                "properties": {
                    "data": {
                        "description": "Job settings data",
                        "properties": {
                            "job_id": {
                                "description": "Unique job identifier",
                                "type": "string"
                            },
                            "model": {
                                "description": "Model name used for upscaling",
                                "type": "string"
                            },
                            "video": {
                                "description": "Presigned URL for the input video file",
                                "type": "string"
                            },
                            "input_width": {
                                "description": "Input video width in pixels",
                                "type": "integer"
                            },
                            "input_height": {
                                "description": "Input video height in pixels",
                                "type": "integer"
                            },
                            "scale": {
                                "description": "Upscale factor. Null for fixed-scale models.",
                                "type": [
                                    "integer",
                                    "null"
                                ]
                            }
                        },
                        "type": "object"
                    }
                },
                "type": "object"
            },
            "WorkerDiffusionModelResource": {
                "properties": {
                    "name": {
                        "description": "Model name",
                        "type": "string"
                    },
                    "slug": {
                        "description": "Model slug",
                        "type": "string"
                    },
                    "is_basic": {
                        "description": "Is model from basic package",
                        "type": "boolean"
                    }
                },
                "type": "object"
            },
            "WorkerDiffusionModelCollection": {
                "required": [
                    "data",
                    "links",
                    "meta"
                ],
                "properties": {
                    "data": {
                        "description": "List of available models.",
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/WorkerDiffusionModelResource"
                        }
                    },
                    "links": {
                        "description": "Absolute URLs for navigating the result set; `prev`/`next` are null at the ends.",
                        "properties": {
                            "first": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "uri"
                            },
                            "last": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "uri"
                            },
                            "prev": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "uri"
                            },
                            "next": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "uri"
                            }
                        },
                        "type": "object"
                    },
                    "meta": {
                        "description": "Pagination counters. `per_page` is the page size that was applied.",
                        "properties": {
                            "current_page": {
                                "type": "integer",
                                "example": 1
                            },
                            "from": {
                                "type": [
                                    "integer",
                                    "null"
                                ],
                                "example": 1
                            },
                            "last_page": {
                                "type": "integer",
                                "example": 2
                            },
                            "links": {
                                "type": "array",
                                "items": {
                                    "properties": {
                                        "url": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "label": {
                                            "type": "string"
                                        },
                                        "page": {
                                            "type": [
                                                "integer",
                                                "null"
                                            ]
                                        },
                                        "active": {
                                            "type": "boolean"
                                        }
                                    },
                                    "type": "object"
                                }
                            },
                            "path": {
                                "type": "string",
                                "format": "uri"
                            },
                            "per_page": {
                                "type": "integer",
                                "example": 25
                            },
                            "to": {
                                "type": [
                                    "integer",
                                    "null"
                                ],
                                "example": 25
                            },
                            "total": {
                                "type": "integer",
                                "example": 30
                            }
                        },
                        "type": "object"
                    }
                },
                "type": "object"
            },
            "WebTextOption": {
                "description": "Return the page as clean text (Markdown-like). `true` uses the default length cap of 20,000 characters; an object lets you set your own cap. Longer pages are cut at the cap.",
                "oneOf": [
                    {
                        "type": "boolean"
                    },
                    {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                            "max_length": {
                                "description": "Maximum number of characters of text returned per page.",
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 100000,
                                "example": 5000
                            }
                        }
                    }
                ],
                "example": {
                    "max_length": 5000
                }
            },
            "WebExcerptsOption": {
                "description": "Return the passages of the page most relevant to your search (or to `query`, if you set one). `true` ranks passages against the search query; on the contents endpoint, which has no search query, pass an object with `query` to steer the selection.",
                "oneOf": [
                    {
                        "type": "boolean"
                    },
                    {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                            "query": {
                                "description": "What the excerpts should be about.",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 2000,
                                "example": "pricing"
                            }
                        }
                    }
                ],
                "example": true
            },
            "WebSummaryOption": {
                "description": "Return a short AI-written summary of each page. `true` writes a general summary; an object with `query` focuses the summary on a question. Billed per page (see pricing).",
                "oneOf": [
                    {
                        "type": "boolean"
                    },
                    {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                            "query": {
                                "description": "Question or angle the summary should answer.",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 2000,
                                "example": "What does this company offer?"
                            }
                        }
                    }
                ],
                "example": {
                    "query": "What does this company offer?"
                }
            },
            "WebSearchRequestBody": {
                "type": "object",
                "required": [
                    "query"
                ],
                "properties": {
                    "query": {
                        "description": "What to search for, in natural language or as keywords.",
                        "type": "string",
                        "maxLength": 2000,
                        "example": "open source text to image models 2026"
                    },
                    "mode": {
                        "description": "`quick` is the fastest and cheapest; `balanced` takes a little longer, returns better-ranked results and is the only mode that can return `summary`. Defaults to `balanced`.",
                        "type": "string",
                        "enum": [
                            "quick",
                            "balanced"
                        ],
                        "default": "balanced",
                        "example": "quick"
                    },
                    "limit": {
                        "description": "Maximum number of results. The base price covers up to 10 results; every result above 10 adds to the price.",
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 25,
                        "default": 10,
                        "example": 5
                    },
                    "include": {
                        "description": "Page content to return with each result. Leave it out to get only `url`, `title` and the metadata the page exposes.",
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                            "text": {
                                "$ref": "#/components/schemas/WebTextOption"
                            },
                            "excerpts": {
                                "$ref": "#/components/schemas/WebExcerptsOption"
                            },
                            "summary": {
                                "allOf": [
                                    {
                                        "$ref": "#/components/schemas/WebSummaryOption"
                                    }
                                ],
                                "description": "AI-written summary of each result. Only available in `balanced` mode — in `quick` mode the request is refused with 422 (`include.summary`)."
                            }
                        }
                    },
                    "only_domains": {
                        "description": "Return results from these domains only. Bare hostnames such as `deapi.ai` or `docs.deapi.ai` — no scheme, path, port or wildcard.",
                        "type": "array",
                        "maxItems": 50,
                        "items": {
                            "type": "string",
                            "example": "deapi.ai"
                        },
                        "example": [
                            "deapi.ai",
                            "docs.deapi.ai"
                        ]
                    },
                    "country": {
                        "description": "Bias results towards a country. ISO 3166-1 alpha-2 code, case-insensitive (e.g. `US`, `DE`, `PL`).",
                        "type": "string",
                        "minLength": 2,
                        "maxLength": 2,
                        "example": "US"
                    },
                    "published_after": {
                        "description": "Only results published on or after this date (ISO 8601 date or date-time).",
                        "type": "string",
                        "format": "date",
                        "example": "2026-01-01"
                    },
                    "published_before": {
                        "description": "Only results published on or before this date (ISO 8601 date or date-time). Must not be earlier than `published_after`.",
                        "type": "string",
                        "format": "date",
                        "example": "2026-11-01"
                    }
                }
            },
            "WebContentsRequestBody": {
                "type": "object",
                "required": [
                    "urls"
                ],
                "description": "Request at least one of `text`, `excerpts` or `summary` — a request with none of them is refused with 422.",
                "properties": {
                    "urls": {
                        "description": "Pages to read. Full URLs including the scheme (`https://…`).",
                        "type": "array",
                        "minItems": 1,
                        "maxItems": 20,
                        "items": {
                            "type": "string",
                            "format": "uri"
                        },
                        "example": [
                            "https://deapi.ai"
                        ]
                    },
                    "text": {
                        "$ref": "#/components/schemas/WebTextOption"
                    },
                    "excerpts": {
                        "$ref": "#/components/schemas/WebExcerptsOption"
                    },
                    "summary": {
                        "$ref": "#/components/schemas/WebSummaryOption"
                    }
                }
            },
            "WebSearchResult": {
                "type": "object",
                "required": [
                    "url"
                ],
                "description": "One search hit. Every field except `url` is optional and omitted (not null) when unavailable.",
                "properties": {
                    "url": {
                        "description": "Page URL.",
                        "type": "string",
                        "format": "uri",
                        "example": "https://deapi.ai/"
                    },
                    "title": {
                        "description": "Page title. Omitted when the page has none.",
                        "type": "string",
                        "example": "deAPI - One API for Open Source Generative AI Models"
                    },
                    "published_at": {
                        "description": "Publication date, when the page exposes one. Omitted otherwise.",
                        "type": "string",
                        "format": "date-time",
                        "example": "2026-10-20T08:48:00+00:00"
                    },
                    "author": {
                        "description": "Author, when the page exposes one. Omitted otherwise.",
                        "type": "string",
                        "example": "deAPI"
                    },
                    "image": {
                        "description": "Representative image (e.g. the Open Graph image), when the page has one. Omitted otherwise.",
                        "type": "string",
                        "format": "uri",
                        "example": "https://deapi.ai/images/og/og-deapi.jpg"
                    },
                    "text": {
                        "description": "Page text, present when `text` was requested. Cut at `max_length` (default 20,000 characters).",
                        "type": "string"
                    },
                    "excerpts": {
                        "description": "Most relevant passages, present when `excerpts` was requested.",
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "summary": {
                        "description": "AI-written summary, present when `summary` was requested.",
                        "type": "string"
                    }
                }
            },
            "WebContentsResult": {
                "type": "object",
                "required": [
                    "url",
                    "status"
                ],
                "description": "One requested page, in the order of `urls`. Optional fields are omitted (not null) when unavailable.",
                "properties": {
                    "url": {
                        "description": "Page URL.",
                        "type": "string",
                        "format": "uri",
                        "example": "https://deapi.ai/"
                    },
                    "status": {
                        "description": "`ok` — the page was read and the requested content is present. `not_found` — the page returned 404. `unknown` — the page could not be read for another reason (unreachable host, server error, blocked). Pages that are not `ok` carry only `url` and `status`, and are not charged.",
                        "type": "string",
                        "enum": [
                            "ok",
                            "not_found",
                            "unknown"
                        ],
                        "example": "ok"
                    },
                    "title": {
                        "description": "Page title. Omitted when the page has none.",
                        "type": "string",
                        "example": "deAPI - One API for Open Source Generative AI Models"
                    },
                    "published_at": {
                        "description": "Publication date, when the page exposes one. Omitted otherwise.",
                        "type": "string",
                        "format": "date-time",
                        "example": "2026-10-20T08:48:00+00:00"
                    },
                    "author": {
                        "description": "Author, when the page exposes one. Omitted otherwise.",
                        "type": "string",
                        "example": "deAPI"
                    },
                    "image": {
                        "description": "Representative image (e.g. the Open Graph image), when the page has one. Omitted otherwise.",
                        "type": "string",
                        "format": "uri",
                        "example": "https://deapi.ai/images/og/og-deapi.jpg"
                    },
                    "text": {
                        "description": "Page text, present when `text` was requested. Cut at `max_length` (default 20,000 characters).",
                        "type": "string"
                    },
                    "excerpts": {
                        "description": "Most relevant passages, present when `excerpts` was requested.",
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "summary": {
                        "description": "AI-written summary, present when `summary` was requested.",
                        "type": "string"
                    }
                }
            },
            "WebSearchResponse": {
                "type": "object",
                "description": "Returned directly — there is no `data` envelope and no job to poll.",
                "properties": {
                    "request_id": {
                        "description": "Identifier of this request, useful when contacting support.",
                        "type": "string",
                        "format": "uuid",
                        "example": "ba1e1b58-a12c-4f83-9ec7-572e301fa1c2"
                    },
                    "cost": {
                        "description": "What this request was charged, in USD. Matches the amount deducted from the balance and reported by the usage endpoints.",
                        "type": "number",
                        "format": "float",
                        "example": 0.0048
                    },
                    "results": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/WebSearchResult"
                        }
                    }
                }
            },
            "WebContentsResponse": {
                "type": "object",
                "description": "Returned directly — there is no `data` envelope and no job to poll.",
                "properties": {
                    "request_id": {
                        "description": "Identifier of this request, useful when contacting support.",
                        "type": "string",
                        "format": "uuid",
                        "example": "ba1e1b58-a12c-4f83-9ec7-572e301fa1c2"
                    },
                    "cost": {
                        "description": "What this request was charged, in USD. Matches the amount deducted from the balance and reported by the usage endpoints.",
                        "type": "number",
                        "format": "float",
                        "example": 0.0048
                    },
                    "results": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/WebContentsResult"
                        }
                    }
                }
            },
            "WebPriceResponse": {
                "type": "object",
                "description": "Unlike the other price endpoints, the price is returned at the top level, not inside `data`.",
                "properties": {
                    "price": {
                        "description": "What the request would cost, in USD. A quote only — nothing is charged by this endpoint.",
                        "type": "number",
                        "format": "float",
                        "example": 0.0048
                    }
                }
            }
        },
        "responses": {
            "AccountSuspended": {
                "description": "The account is suspended. Applies to every endpoint that spends credits — generation, transcription and prompt enhancement — and is returned before any validation runs, so a suspended account sees this rather than a 422 about the body. Price-estimate endpoints are not gated and keep working.",
                "content": {
                    "application/json": {
                        "schema": {
                            "properties": {
                                "message": {
                                    "description": "Human-readable explanation. No `errors` object accompanies this response.",
                                    "type": "string",
                                    "example": "Client account is suspended. If you believe this is a mistake, contact us."
                                }
                            },
                            "type": "object"
                        }
                    }
                }
            },
            "InsufficientPermissions": {
                "description": "The API key may not make this call. `insufficient_permissions` — its role does not cover this endpoint; account billing and key management need an ADMIN key, and the role is fixed when the key is created. `ip_not_allowed` — the key carries an IP whitelist and the call did not come from an address on it; nothing is created and nothing is charged, and the call does not spend the account's request allowance. Keep calling from a refused address and the 403 turns into a 429 with `X-RateLimit-Type: ip-not-allowed`, counted against that address alone.",
                "content": {
                    "application/json": {
                        "schema": {
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "example": "This API key does not have permission to access this endpoint."
                                },
                                "code": {
                                    "type": "string",
                                    "example": "insufficient_permissions",
                                    "enum": [
                                        "insufficient_permissions",
                                        "ip_not_allowed"
                                    ]
                                }
                            },
                            "type": "object"
                        }
                    }
                }
            },
            "KeyLimitExceeded": {
                "description": "The API key sending the request has no room left under its own spend limit (`limit` / `reset_interval` on the key). Nothing was created and nothing was charged — the request is refused before the job exists. `resets_at` is when the window starts over and work flows again; it is null for a limit that never resets (`reset_interval: none`), and the way through then is to raise or remove the limit on the key. The key itself stays active — an exhausted limit refuses work, it does not deactivate anything, and the account's other keys are unaffected.\n\nDO NOT confuse `key_limit_exceeded` with `active_key_limit_reached`. This one is about MONEY: one key, one window, one ceiling in USD, and it is a 402 on the endpoints that spend. `active_key_limit_reached` is about the NUMBER of keys an account may keep active at once, and it is a 422 on POST /v2/keys and PATCH /v2/keys/{id}. They share no field and no remedy.\n\n`limit_used` here and the totals from GET /keys/{id}/usage are different questions and will not agree: usage sums what the key spent over the period you ask for, this counts what went through the ceiling since the current window opened, nothing is counted while a key has no limit, and a post-paid request counts at its estimate until the provider reports its real cost.",
                "content": {
                    "application/json": {
                        "schema": {
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "example": "This API key has reached its spend limit of $100.00. It resets on 2026-10-22T10:00:00+00:00."
                                },
                                "code": {
                                    "type": "string",
                                    "example": "key_limit_exceeded",
                                    "enum": [
                                        "key_limit_exceeded"
                                    ]
                                },
                                "limit": {
                                    "description": "The key's ceiling for the window, in USD.",
                                    "type": "number",
                                    "format": "float",
                                    "example": 100
                                },
                                "used": {
                                    "description": "Spent against it in the window running now.",
                                    "type": "number",
                                    "format": "float",
                                    "example": 99.5
                                },
                                "remaining": {
                                    "description": "What is left of it. Never negative.",
                                    "type": "number",
                                    "format": "float",
                                    "example": 0.5
                                },
                                "resets_at": {
                                    "description": "When the window starts over. Null for a limit that never resets.",
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "format": "date-time",
                                    "example": "2026-10-22T10:00:00+00:00"
                                }
                            },
                            "type": "object"
                        }
                    }
                }
            },
            "ApiKeyLimitReached": {
                "description": "The account already has as many active API keys as it may. Disabled, expired and deleted keys do not count — disable or delete keys that are no longer used. This is the number of keys, not money: a key that has spent its own `limit` is refused with 402 `key_limit_exceeded`, never with this code.",
                "content": {
                    "application/json": {
                        "schema": {
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "example": "You have reached the limit of 100 active API keys — delete or deactivate the ones you no longer use."
                                },
                                "code": {
                                    "type": "string",
                                    "example": "active_key_limit_reached",
                                    "enum": [
                                        "active_key_limit_reached"
                                    ]
                                }
                            },
                            "type": "object"
                        }
                    }
                }
            },
            "ApiKeyCreationRateLimited": {
                "description": "Too many keys created over the API in the last hour — the limit is per account, shared by all its ADMIN keys and separate from keys created in the Dashboard. Retry after `Retry-After` seconds. Also returned when the general request rate for this endpoint is exceeded; `X-RateLimit-Type` tells them apart — `key-creation` here, `minute` or `daily` there.",
                "headers": {
                    "Retry-After": {
                        "description": "Seconds until another key can be created.",
                        "schema": {
                            "type": "integer",
                            "example": 1800
                        }
                    },
                    "X-RateLimit-Type": {
                        "$ref": "#/components/headers/X-RateLimit-Type"
                    },
                    "X-RateLimit-Limit": {
                        "$ref": "#/components/headers/X-RateLimit-Limit"
                    },
                    "X-RateLimit-Remaining": {
                        "$ref": "#/components/headers/X-RateLimit-Remaining"
                    },
                    "X-RateLimit-Reset": {
                        "$ref": "#/components/headers/X-RateLimit-Reset"
                    },
                    "X-RateLimit-Policy": {
                        "$ref": "#/components/headers/X-RateLimit-Policy"
                    }
                },
                "content": {
                    "application/json": {
                        "schema": {
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "example": "Too many API keys created recently."
                                },
                                "code": {
                                    "type": "string",
                                    "example": "rate_limited",
                                    "enum": [
                                        "rate_limited"
                                    ]
                                },
                                "retry_after": {
                                    "type": "integer",
                                    "example": 1800
                                }
                            },
                            "type": "object"
                        }
                    }
                }
            },
            "ValidationErrorBare": {
                "description": "Validation failed, returned WITHOUT the usual `message` / `errors` envelope. These endpoints override `failedValidation()` to return the message bag directly, so the body is a flat map of field name to array of messages — e.g. `{\"type\": [\"The type field is required.\"]}`. Parse it differently from the 422 of every other endpoint, which nests the same map under `errors`.",
                "content": {
                    "application/json": {
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "array",
                                "items": {
                                    "type": "string"
                                }
                            }
                        },
                        "example": {
                            "type": [
                                "The type field is required."
                            ]
                        }
                    }
                }
            },
            "ValidationError": {
                "description": "Validation failed. Common errors include: model does not exist, model does not support the inference type for this endpoint, the model is not available on your plan (it requires a higher tier than your account has — upgrade to use it), or invalid request parameters.\n\nAn account without the funds for the request is refused here too, reported on the `balance` field and carrying `code: insufficient_balance`. It is the one validation failure worth branching on: nothing about the request is wrong, so retrying it unchanged succeeds once the account is topped up. The code is present only when `balance` is the sole failure — a request that is also malformed is not a money problem.",
                "content": {
                    "application/json": {
                        "schema": {
                            "properties": {
                                "message": {
                                    "description": "General error message",
                                    "type": "string",
                                    "example": "The selected model does not support Text To Image."
                                },
                                "code": {
                                    "description": "Only on a refusal for want of funds: `insufficient_balance`. Absent on every other validation failure.",
                                    "type": "string",
                                    "example": "insufficient_balance",
                                    "enum": [
                                        "insufficient_balance"
                                    ]
                                },
                                "errors": {
                                    "description": "Detailed validation errors by field. A model your plan does not cover is reported on the \"model\" field with the message \"This model is not available on your plan. Please upgrade to access it.\" Such a model is also omitted from GET /models.",
                                    "type": "object",
                                    "example": {
                                        "model": [
                                            "This model is not available on your plan. Please upgrade to access it."
                                        ]
                                    }
                                }
                            },
                            "type": "object"
                        }
                    }
                }
            },
            "RateLimitExceeded": {
                "description": "Rate limit exceeded. `X-RateLimit-Type` says which bucket refused you and which bucket the other `X-RateLimit-*` headers describe: the minute (RPM) or daily (RPD) request window, or — on a key carrying an IP whitelist — `ip-not-allowed`, the separate allowance for calls from an address the list refuses. That last one is counted against the calling address rather than the account, so being refused from a blocked address never spends the owner's request allowance.",
                "headers": {
                    "X-RateLimit-Limit": {
                        "$ref": "#/components/headers/X-RateLimit-Limit"
                    },
                    "X-RateLimit-Remaining": {
                        "$ref": "#/components/headers/X-RateLimit-Remaining"
                    },
                    "X-RateLimit-Daily-Limit": {
                        "$ref": "#/components/headers/X-RateLimit-Daily-Limit"
                    },
                    "X-RateLimit-Daily-Remaining": {
                        "$ref": "#/components/headers/X-RateLimit-Daily-Remaining"
                    },
                    "X-RateLimit-Type": {
                        "$ref": "#/components/headers/X-RateLimit-Type"
                    },
                    "Retry-After": {
                        "$ref": "#/components/headers/Retry-After"
                    },
                    "X-RateLimit-Reset": {
                        "$ref": "#/components/headers/X-RateLimit-Reset"
                    },
                    "X-RateLimit-Daily-Reset": {
                        "$ref": "#/components/headers/X-RateLimit-Daily-Reset"
                    },
                    "X-RateLimit-Source": {
                        "$ref": "#/components/headers/X-RateLimit-Source"
                    },
                    "X-RateLimit-Policy": {
                        "$ref": "#/components/headers/X-RateLimit-Policy"
                    }
                },
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/response_error_rate_limit"
                        }
                    }
                }
            },
            "EndpointGone": {
                "description": "This endpoint has been permanently removed and will never return data again. The response body and the Link header point to the replacement endpoint and its documentation. Retrying will not help — migrate to the successor.",
                "headers": {
                    "Link": {
                        "description": "RFC 8288 links to the replacement endpoint (rel=\"successor-version\") and its documentation (rel=\"help\").",
                        "schema": {
                            "type": "string",
                            "example": "<https://api.deapi.ai/api/v2/prompts/enhancements>; rel=\"successor-version\", <https://docs.deapi.ai/api/v2/prompt-enhancement/prompt-booster>; rel=\"help\""
                        }
                    },
                    "Deprecation": {
                        "description": "Always \"true\" on a removed endpoint.",
                        "schema": {
                            "type": "string",
                            "example": "true"
                        }
                    }
                },
                "content": {
                    "application/json": {
                        "schema": {
                            "properties": {
                                "message": {
                                    "description": "Human-readable explanation naming the replacement endpoint.",
                                    "type": "string",
                                    "example": "This endpoint has been permanently removed. Use https://api.deapi.ai/api/v2/prompts/enhancements instead. See https://docs.deapi.ai/api/v2/prompt-enhancement/prompt-booster"
                                },
                                "successor": {
                                    "description": "Absolute URL of the replacement endpoint.",
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "example": "https://api.deapi.ai/api/v2/prompts/enhancements"
                                },
                                "documentation": {
                                    "description": "Absolute URL of the replacement endpoint documentation.",
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "example": "https://docs.deapi.ai/api/v2/prompt-enhancement/prompt-booster"
                                }
                            },
                            "type": "object"
                        }
                    }
                }
            }
        },
        "parameters": {
            "AcceptHeader": {
                "name": "Accept",
                "in": "header",
                "required": true,
                "schema": {
                    "type": "string",
                    "default": "application/json",
                    "enum": [
                        "application/json"
                    ]
                }
            },
            "WebhookSignatureHeader": {
                "name": "X-DeAPI-Signature",
                "in": "header",
                "description": "sha256=\" + HMAC_SHA256(secret, \"<X-DeAPI-Timestamp>.<raw body>\"). Hash the RAW body exactly as received, escaped slashes and all — PHP's json_encode emits \"\\/\" in URLs, so re-serializing the parsed JSON yields a different signature and every check fails. EMPTY when neither a per-request nor an account-default secret exists — the call is still delivered, unsigned. Reject an empty value if you require authenticity.",
                "required": true,
                "schema": {
                    "type": "string",
                    "example": "sha256=7b2c…"
                }
            },
            "WebhookTimestampHeader": {
                "name": "X-DeAPI-Timestamp",
                "in": "header",
                "description": "Unix epoch seconds at send time. Part of the signed message. Reject timestamps older than 5 minutes (replay protection).",
                "required": true,
                "schema": {
                    "type": "integer",
                    "example": 1756963200
                }
            },
            "WebhookEventHeader": {
                "name": "X-DeAPI-Event",
                "in": "header",
                "description": "Which lifecycle event this delivery carries.",
                "required": true,
                "schema": {
                    "type": "string",
                    "example": "job.completed",
                    "enum": [
                        "job.processing",
                        "job.completed",
                        "job.failed"
                    ]
                }
            },
            "WebhookDeliveryIdHeader": {
                "name": "X-DeAPI-Delivery-Id",
                "in": "header",
                "description": "Unique id for this delivery attempt. Stable across retries of the same notification, so it doubles as an idempotency key.",
                "required": true,
                "schema": {
                    "type": "string",
                    "format": "uuid"
                }
            },
            "ListLimit": {
                "name": "limit",
                "in": "query",
                "description": "Items per page. `per_page` is accepted as an alias; `limit` wins if both are sent. Values above the maximum are clamped down, not rejected.",
                "required": false,
                "schema": {
                    "type": "integer",
                    "default": 50,
                    "maximum": 100,
                    "minimum": 1
                }
            },
            "ListPerPage": {
                "name": "per_page",
                "in": "query",
                "description": "Alias of `limit`, kept for backward compatibility. Ignored when `limit` is also present.",
                "required": false,
                "schema": {
                    "type": "integer",
                    "default": 50,
                    "maximum": 100,
                    "minimum": 1
                }
            },
            "ListPage": {
                "name": "page",
                "in": "query",
                "required": false,
                "schema": {
                    "type": "integer",
                    "default": 1,
                    "minimum": 1
                }
            },
            "UsageFrom": {
                "name": "from",
                "in": "query",
                "description": "Start of the range, UTC, inclusive. Default: 7 days before `to`. Cannot be older than the data retention (90 days).",
                "required": false,
                "schema": {
                    "type": "string",
                    "format": "date-time",
                    "example": "2026-09-15T00:00:00Z"
                }
            },
            "UsageTo": {
                "name": "to",
                "in": "query",
                "description": "End of the range, UTC, exclusive. Default: now. An hourly breakdown covers at most 31 days.",
                "required": false,
                "schema": {
                    "type": "string",
                    "format": "date-time",
                    "example": "2026-09-22T00:00:00Z"
                }
            },
            "ClientModelsSort": {
                "name": "sort",
                "in": "query",
                "description": "Sort field. Prefix with `-` for descending. `-created_at` is newest first, `created_at` is oldest first. Defaults to `-created_at` — newest models first, tie-broken by `id`.",
                "required": false,
                "schema": {
                    "type": "string",
                    "default": "-created_at",
                    "enum": [
                        "id",
                        "-id",
                        "name",
                        "-name",
                        "created_at",
                        "-created_at",
                        "updated_at",
                        "-updated_at"
                    ]
                }
            },
            "WorkerModelsSort": {
                "name": "sort",
                "in": "query",
                "description": "Sort field. Prefix with `-` for descending. Defaults to `id` (ascending catalogue order). Note this differs from the client surface, which defaults to newest-first.",
                "required": false,
                "schema": {
                    "type": "string",
                    "default": "id",
                    "enum": [
                        "id",
                        "-id",
                        "name",
                        "-name",
                        "created_at",
                        "-created_at",
                        "updated_at",
                        "-updated_at"
                    ]
                }
            }
        },
        "headers": {
            "X-RateLimit-Limit": {
                "description": "Maximum requests allowed per minute (RPM) — including on a `daily` rejection, where the day is reported by the Daily-* pair beside it. On a 429 whose `X-RateLimit-Type` names a bucket outside the request rate (`key-creation`, `ip-not-allowed`) it is that bucket's allowance instead, over the window `X-RateLimit-Policy` gives.",
                "schema": {
                    "type": "integer",
                    "example": 3
                }
            },
            "X-RateLimit-Remaining": {
                "description": "Requests left in the window `X-RateLimit-Limit` describes — so on a `daily` rejection it is the minute window and can still be non-zero; `X-RateLimit-Daily-Remaining` is the one at 0 there.",
                "schema": {
                    "type": "integer",
                    "example": 2
                }
            },
            "X-RateLimit-Daily-Limit": {
                "description": "Maximum requests allowed per day (RPD)",
                "schema": {
                    "type": "integer",
                    "example": 100
                }
            },
            "X-RateLimit-Daily-Remaining": {
                "description": "Remaining requests in current day window",
                "schema": {
                    "type": "integer",
                    "example": 95
                }
            },
            "X-RateLimit-Type": {
                "description": "Which limit rejected the request. Sent only on 429. Read it before anything else\non the response: it decides what the other `X-RateLimit-*` headers are counting.\n\n`minute` — the per-request RPM window. `X-RateLimit-Limit`/`-Remaining`/`-Reset`\ndescribe it, and the Daily-* pair describes the day next to it when one applies.\n\n`daily` — the per-request RPD window. The Daily-* pair is the one at 0; the\nunprefixed trio keeps describing the minute window, so it can be non-zero.\n\n`key-creation` — the hourly cap on keys created over the API (`POST /v2/keys`),\nper account and shared by its ADMIN keys, counted separately from the request\nrate. The whole `X-RateLimit-*` set describes that bucket and there are no\nDaily-* headers, so `Retry-After` can be an hour while your request rate is\nbarely touched. That is not a contradiction — it is a different bucket.\n\n`ip-not-allowed` — too many calls from an address your key's IP whitelist\nrefuses. Counted against that address, never against your account: a call from a\nblocked address does not spend your request allowance, which is why it cannot be\nused to exhaust it. Fix the whitelist or call from a listed address.\n\nThe buckets are independent, so do not compare figures across responses that\nreport different types — and do not assume the minute window when a 429 names\nanother one, or you will retry straight into the same refusal.",
                "schema": {
                    "type": "string",
                    "example": "minute",
                    "enum": [
                        "minute",
                        "daily",
                        "key-creation",
                        "ip-not-allowed"
                    ]
                }
            },
            "Retry-After": {
                "description": "Seconds until the window that rejected you frees up — the one `X-RateLimit-Type` names (up to 60 for minute, 3600 for key-creation, 86400 for daily). Counted from when that window opened, not to a calendar boundary. Sent only on 429.",
                "schema": {
                    "type": "integer",
                    "example": 60
                }
            },
            "X-RateLimit-Reset": {
                "description": "Epoch second at which the window described by `X-RateLimit-Limit` refills — the minute (RPM) one unless `X-RateLimit-Type` names another bucket. Fixed window: the value does not drift as you spend the quota. Describes the same window as X-RateLimit-Limit, including on a daily rejection.",
                "schema": {
                    "type": "integer",
                    "example": 1755800460
                }
            },
            "X-RateLimit-Daily-Reset": {
                "description": "Epoch second at which the daily (RPD) window refills — 86400 s after the first request that opened this bucket's window, not a calendar midnight. Present only when a daily limit applies.",
                "schema": {
                    "type": "integer",
                    "example": 1755846000
                }
            },
            "X-RateLimit-Source": {
                "description": "Where the limit came from, so you know what would change it:\n`tier` — your account tier's rate for this endpoint;\n`fallback` — no rate configured for this tier and endpoint, degraded default in force;\n`model` — a per-model override for the model in the request, unaffected by your tier\n(only when the request carried a recognised `model`, otherwise the tier pool applies);\n`static` — a flat limit outside the tier system, identical for every account.\n\nIf you ever see `fallback`, tell us: it means no rate is configured for that tier and endpoint.",
                "schema": {
                    "type": "string",
                    "example": "tier",
                    "enum": [
                        "tier",
                        "fallback",
                        "model",
                        "static"
                    ]
                }
            },
            "X-RateLimit-Policy": {
                "description": "Every window that applies, as `<limit>;w=<seconds>` elements. Always present on a throttled response, so a single element means there is no daily limit — do not infer that from the absence of the Daily-* headers. `300;w=60` is minute-only; `3;w=60, 100;w=86400` is both.",
                "schema": {
                    "type": "string",
                    "example": "3;w=60, 100;w=86400"
                }
            }
        },
        "securitySchemes": {
            "bearerAuth": {
                "type": "http",
                "description": "Sanctum personal access token, sent as `Authorization: Bearer <token>`. The token is opaque — it carries no claims and no embedded expiry, so do not attempt to decode it. Issue and revoke tokens from your account dashboard.",
                "scheme": "bearer"
            }
        }
    },
    "security": [
        {
            "bearerAuth": []
        }
    ],
    "tags": [
        {
            "name": "Client API v2",
            "description": "Current client endpoints (OpenAI-aligned noun-based paths)"
        }
    ],
    "webhooks": {
        "job.processing": {
            "post": {
                "summary": "Job started processing",
                "description": "Sent once a worker picks the job up. Delivered only if you supplied a webhook_url on the request, or configured an account-default webhook.",
                "operationId": "webhookJobProcessing",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/WebhookEventHeader"
                    },
                    {
                        "$ref": "#/components/parameters/WebhookSignatureHeader"
                    },
                    {
                        "$ref": "#/components/parameters/WebhookTimestampHeader"
                    },
                    {
                        "$ref": "#/components/parameters/WebhookDeliveryIdHeader"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/WebhookProcessingPayload"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Delivery acknowledged. Any 2xx counts as success; anything else (or a timeout) is retried — 10 attempts over roughly 24 hours."
                    }
                }
            },
            "servers": [
                {
                    "url": "https://api.deapi.ai",
                    "description": "Production API Server base URL"
                }
            ]
        },
        "job.completed": {
            "post": {
                "summary": "Job completed successfully",
                "description": "Terminal event carrying the result. A per-request webhook_url is self-contained: it fires even when the account has no webhook configuration, or that configuration is disabled.",
                "operationId": "webhookJobCompleted",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/WebhookEventHeader"
                    },
                    {
                        "$ref": "#/components/parameters/WebhookSignatureHeader"
                    },
                    {
                        "$ref": "#/components/parameters/WebhookTimestampHeader"
                    },
                    {
                        "$ref": "#/components/parameters/WebhookDeliveryIdHeader"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/WebhookCompletedPayload"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Delivery acknowledged. Any 2xx counts as success; anything else (or a timeout) is retried — 10 attempts over roughly 24 hours."
                    }
                }
            },
            "servers": [
                {
                    "url": "https://api.deapi.ai",
                    "description": "Production API Server base URL"
                }
            ]
        },
        "job.failed": {
            "post": {
                "summary": "Job failed",
                "description": "Terminal event carrying the failure reason. Whether the job was refunded is reported in the payload; consult GET /api/v2/jobs/{job_request} for the authoritative final state.",
                "operationId": "webhookJobFailed",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/WebhookEventHeader"
                    },
                    {
                        "$ref": "#/components/parameters/WebhookSignatureHeader"
                    },
                    {
                        "$ref": "#/components/parameters/WebhookTimestampHeader"
                    },
                    {
                        "$ref": "#/components/parameters/WebhookDeliveryIdHeader"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/WebhookFailedPayload"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Delivery acknowledged. Any 2xx counts as success; anything else (or a timeout) is retried — 10 attempts over roughly 24 hours."
                    }
                }
            },
            "servers": [
                {
                    "url": "https://api.deapi.ai",
                    "description": "Production API Server base URL"
                }
            ]
        }
    }
}
