{"openapi":"3.1.0","info":{"title":"everyais API","version":"1.0.0","description":"OpenAI-compatible multi-cloud AI gateway. Chat, images, and video generation through a single API key. Available models and capabilities are listed by GET /v1/models.\n\nHuman-readable docs: https://platform.everyais.com/docs","contact":{"email":"portal@everyais.com","url":"https://platform.everyais.com/contact"}},"servers":[{"url":"https://api.everyais.com","description":"Production"}],"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"externalDocs":{"description":"Developer documentation","url":"https://platform.everyais.com/docs"},"tags":[{"name":"Chat","description":"Text generation"},{"name":"Images","description":"Image generation and editing"},{"name":"Video","description":"Asynchronous video generation"},{"name":"Models","description":"Model catalog"},{"name":"Outputs","description":"Stored request history"}],"paths":{"/v1/chat/completions":{"post":{"tags":["Chat"],"operationId":"createChatCompletion","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"summary":"Create a chat completion","description":"Set `stream: true` for server-sent events. `n` must be 1. Add `tools: [{\"type\": \"web_search\"}]` on models whose `capabilities.web_search` is true. Google bills per executed search query; Z.AI bills one search per successful search-enabled request, even with no results. Search is billed separately from tokens.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletionRequest"}}}},"responses":{"200":{"description":"Completion, or an SSE stream of `chat.completion.chunk` events when `stream` is true. Non-streaming responses carry the request price in the `x-everyais-cost-usd` header.","headers":{"x-everyais-cost-usd":{"description":"Service price of this request in USD","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletion"}},"text/event-stream":{"schema":{"type":"string"}}}},"400":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/messages":{"post":{"tags":["Chat"],"operationId":"createMessage","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"summary":"Create a message (Anthropic-compatible)","description":"Anthropic Messages API shape, for Claude Code and the Anthropic SDKs. Point `ANTHROPIC_BASE_URL` at https://api.everyais.com (without `/v1`).","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageRequest"}}}},"responses":{"200":{"description":"Anthropic-shaped message or SSE stream"},"400":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/messages/count_tokens":{"post":{"tags":["Chat"],"operationId":"countMessageTokens","summary":"Estimate input tokens","description":"Free local estimate without a provider call. Text uses a local tokenizer and image blocks use a fixed estimate; billed provider token counts may differ. max_tokens is not required.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string"},"messages":{"type":"array","items":{"type":"object"}},"system":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object"}}]},"tools":{"type":"array","items":{"type":"object"}}}}}}},"responses":{"200":{"description":"Estimated input tokens","content":{"application/json":{"schema":{"type":"object","required":["input_tokens"],"properties":{"input_tokens":{"type":"integer","minimum":1}}}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/ApiError"},"500":{"$ref":"#/components/responses/ApiError"},"502":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ApiError"}}}},"/v1/responses":{"post":{"tags":["Chat"],"operationId":"createResponse","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"summary":"Create a response","description":"OpenAI Responses API. Set `background: true` to queue the work and poll `GET /v1/responses/{id}` instead of holding the connection open. Background returns JSON even with stream: true. Stateful previous_response_id and server-side web_search are not supported. Function tools use the nested Chat Completions shape.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponsesRequest"}}}},"responses":{"200":{"description":"Response object or SSE stream"},"400":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/responses/{id}":{"get":{"tags":["Chat"],"operationId":"getResponse","summary":"Retrieve a response","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response object. `status` is one of queued, in_progress, completed, incomplete, failed, cancelled."},"400":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/responses/{id}/cancel":{"post":{"tags":["Chat"],"operationId":"cancelResponse","summary":"Cancel a background response","description":"Only `queued` and `in_progress` responses can be cancelled. Reserved credit is refunded.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Cancelled response object"},"400":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/images/generations":{"post":{"tags":["Images"],"operationId":"createImage","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"summary":"Generate images","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageGenerationRequest"}}}},"responses":{"200":{"description":"Generated images"},"400":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/images/edits":{"post":{"tags":["Images"],"operationId":"editImage","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"summary":"Edit an image","description":"Accepts JSON (base64) and multipart/form-data. The entire multipart body is limited to 4 MiB, JSON to 5 MiB. The converted base64 payload must also fit within 5 MiB. Exceeding a limit returns 413.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageEditRequest"}},"multipart/form-data":{"schema":{"type":"object","required":["image","prompt","model"],"properties":{"image":{"type":"string","format":"binary"},"mask":{"type":"string","format":"binary"},"size":{"type":"string","pattern":"^(?:auto|(?:[1-9][0-9]{0,2}|[1-7][0-9]{3}|80[0-9]{2}|81[0-8][0-9]|819[0-2])x(?:[1-9][0-9]{0,2}|[1-7][0-9]{3}|80[0-9]{2}|81[0-8][0-9]|819[0-2]))$","description":"Each dimension is 1..8192. Only the selected endpoint's approved sizes are accepted; check limits.supported_sizes and parameter_constraints. Omission preserves provider defaults. Gemini may use aspect-ratio aliases; Imagen editing rejects explicit size. Approved gpunode deployments can expose additional dimensions."},"response_format":{"type":"string","enum":["url","b64_json"],"default":"url"},"user":{"type":"string"},"prompt":{"type":"string","minLength":1,"maxLength":4000},"model":{"type":"string"},"n":{"type":"integer","minimum":1,"maximum":4,"default":1}}}}}},"responses":{"200":{"description":"Edited images"},"400":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/videos/generations":{"post":{"tags":["Video"],"operationId":"createVideo","summary":"Submit a video generation job","description":"Always asynchronous. Returns a job id immediately; poll `GET /v1/videos/generations/{id}`. Billed as durationSeconds x per-second price.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoGenerationRequest"}}}},"responses":{"200":{"description":"Submitted job","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoJob"}}}},"400":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/videos/generations/{id}":{"get":{"tags":["Video"],"operationId":"getVideo","summary":"Poll a video generation job","description":"Sends `Retry-After: 5` while processing. Jobs expire after 24 hours. Video job ids are a separate space from request ids — `/v1/outputs/{requestId}` always 404s for them.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Job state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoJob"}}}},"400":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/models":{"get":{"tags":["Models"],"operationId":"listModels","summary":"List available models","description":"Filtered by the key's allowed models and account/organization community-supply and training-use consent. `capabilities.web_search` tells you whether a model accepts the `web_search` tool.","responses":{"200":{"description":"Model list","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Model"}}}}}}},"401":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/models/{model}":{"get":{"tags":["Models"],"operationId":"retrieveModel","summary":"Retrieve one model","parameters":[{"name":"model","in":"path","required":true,"description":"Model id, e.g. everyais/claude-opus-5. Slashes are not encoded.","schema":{"type":"string"}}],"responses":{"200":{"description":"Model","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Model"}}}},"401":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/outputs/{requestId}":{"get":{"tags":["Outputs"],"operationId":"getOutput","summary":"Retrieve a stored request","description":"Request history is kept for 24 hours. Not valid for video job ids.","parameters":[{"name":"requestId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Stored request and its output URLs"},"401":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"securitySchemes":{"apiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Alternative to Bearer authentication, including Anthropic SDK clients."},"bearerAuth":{"type":"http","scheme":"bearer","description":"An everyais API key: `Authorization: Bearer everyais_...`"}},"schemas":{"ChatCompletionRequest":{"type":"object","description":"Model and provider-route restrictions apply. OpenAI/Mantle routes using upstream Responses (including GPT-6 and Responses-only models) reject explicit stop, seed, presence_penalty, frequency_penalty, logprobs, and top_logprobs with 400 instead of ignoring them. user is forwarded as the end-user identifier.","required":["model","messages"],"properties":{"model":{"type":"string","examples":["everyais/claude-opus-5"]},"messages":{"type":"array","minItems":1,"maxItems":1000,"items":{"type":"object","required":["role","content"],"properties":{"role":{"type":"string","enum":["system","developer","user","assistant","tool"]},"content":{"oneOf":[{"type":"string"},{"type":"null"},{"type":"array","maxItems":1000,"items":{"type":"object"}}]},"name":{"type":"string"},"tool_call_id":{"type":"string"},"tool_calls":{"type":"array","items":{"type":"object"},"description":"Replay original assistant tool_calls in same-model tool loops, including extra_content.google.thought_signature for Gemini. Do not strip opaque provider fields."}}}},"stream":{"type":"boolean","default":false},"n":{"type":"integer","minimum":1,"maximum":1,"default":1,"description":"Only 1 is supported. Values above 1 are rejected with 400."},"max_tokens":{"type":"integer","minimum":1,"maximum":200000},"max_completion_tokens":{"type":"integer","minimum":1,"maximum":200000,"description":"Alias for max_tokens; max_tokens takes precedence."},"stream_options":{"type":"object","properties":{"include_usage":{"type":"boolean"}}},"models":{"type":"array","maxItems":5,"items":{"type":"string","minLength":1},"description":"Fallback candidates, attempted only before credit reservation."},"provider":{"$ref":"#/components/schemas/ProviderPreferences"},"everyais":{"$ref":"#/components/schemas/EveryaisOptions"},"stop":{"oneOf":[{"type":"string"},{"type":"array","maxItems":4,"items":{"type":"string"}}]},"presence_penalty":{"type":"number","minimum":-2,"maximum":2},"frequency_penalty":{"type":"number","minimum":-2,"maximum":2},"seed":{"type":"integer"},"parallel_tool_calls":{"type":"boolean","description":"Claude honors false by disabling parallel tool use. Gemini rejects false with 400; true or omission allows provider parallel calls. Check capabilities.parallel_tool_calls."},"logprobs":{"type":"boolean","description":"Only supported on compatible Chat Completions routes. Explicit values, including false, return 400 on OpenAI/Mantle upstream Responses routes."},"top_logprobs":{"type":"integer","minimum":0,"maximum":20,"description":"Requires support on the selected Chat Completions route; OpenAI/Mantle upstream Responses routes reject explicit values with 400."},"temperature":{"type":"number","minimum":0,"maximum":2,"description":"Shared schema range; model restrictions apply. Omit on models with capabilities.sampling=false (including latest Claude on Bedrock). Unsupported values/combinations return 400."},"top_p":{"type":"number","minimum":0,"maximum":1},"tools":{"type":"array","maxItems":512,"description":"Function tools, plus at most one `{\"type\": \"web_search\"}` server-side tool. Gemini 2.5 rejects combining JSON output with tools or mixing web search with functions (400); Gemini 3 supports those combinations.","items":{"type":"object"}},"tool_choice":{},"response_format":{"type":"object","description":"text, json_object, or json_schema. Claude JSON without strict=true is best-effort prompt-based output, not a schema guarantee. strict=true requires capabilities.structured_outputs; unsupported strict JSON/tools return 400."},"reasoning_effort":{"type":"string","enum":["none","low","medium","high"],"description":"Supported values are model.limits.reasoning_efforts. Omission differs from none. Latest Claude uses adaptive thinking; Gemini 3 rejects none instead of changing it to low. Gemini 3 Pro supports low/high only."},"extra_body":{"type":"object"},"user":{"type":"string"}}},"ProviderPreferences":{"type":"object","description":"Routing hints only. Former only/order/ignore provider-name selectors are ignored.","properties":{"sort":{"type":"string","enum":["price","latency","throughput"]},"allow_fallbacks":{"type":"boolean"}}},"EveryaisOptions":{"type":"object","properties":{"cache":{"type":"string","enum":["on","off"]},"cache_ttl":{"type":"string","enum":["5m","1h"]},"provider":{"$ref":"#/components/schemas/ProviderPreferences"}}},"ChatCompletion":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"chat.completion"},"created":{"type":"integer"},"model":{"type":"string"},"choices":{"type":"array","items":{"type":"object"}},"usage":{"$ref":"#/components/schemas/Usage"},"x_everyais":{"type":"object","description":"everyais extensions. Present only when relevant to the request.","properties":{"web_search":{"type":"object","properties":{"queries":{"type":"array","items":{"type":"string"}},"search_entry_point_html":{"type":"string"},"billed_queries":{"type":"integer","description":"Search billing units: executed queries for Google; 1 per successful search-enabled Z.AI request, even with no results."}}}}}}},"Usage":{"type":"object","properties":{"prompt_tokens":{"type":"integer"},"completion_tokens":{"type":"integer"},"total_tokens":{"type":"integer"},"prompt_tokens_details":{"type":"object","properties":{"cached_tokens":{"type":"integer"},"cache_creation_tokens":{"type":"integer"}}}}},"ErrorResponse":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["message","type"],"properties":{"message":{"type":"string"},"type":{"type":"string","enum":["invalid_request_error","authentication_error","insufficient_quota_error","permission_error","rate_limit_error","api_error"]},"param":{"type":["string","null"]},"code":{"type":["string","null"]}}}}},"MessageRequest":{"type":"object","required":["model","messages","max_tokens"],"properties":{"model":{"type":"string","minLength":1},"messages":{"type":"array","minItems":1,"items":{"type":"object","required":["role","content"],"properties":{"role":{"type":"string","enum":["user","assistant"]},"content":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object"}}]}}}},"max_tokens":{"type":"integer","minimum":1,"maximum":200000},"system":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object"}}]},"temperature":{"type":"number","minimum":0,"maximum":1,"description":"Requires model sampling support. Latest Claude on Bedrock rejects explicit sampling parameters with 400."},"top_p":{"type":"number","minimum":0,"maximum":1},"top_k":{"type":"integer","minimum":1},"stop_sequences":{"type":"array","maxItems":8,"items":{"type":"string"}},"stream":{"type":"boolean","default":false},"tools":{"type":"array","items":{"type":"object","required":["name","input_schema"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"input_schema":{"type":"object"},"strict":{"type":"boolean","description":"true requires model-specific strict tool support. Unsupported strict tools return 400; JSON structured_outputs support alone is insufficient."}}}},"tool_choice":{"type":"object","description":"auto, any, none, or tool with name. disable_parallel_tool_use=true disables parallel calls. Manual thinking cannot force tools; model restrictions apply."},"metadata":{"type":"object","properties":{"user_id":{"type":"string"}}},"thinking":{"type":"object","description":"Model-specific: manual enabled requires 1024–199999 budget_tokens, less than max_tokens, and a model supporting manual thinking. Latest Claude uses adaptive; Opus/Sonnet 4.6 supports both. Unsupported modes return 400; Fable/Mythos cannot disable thinking."},"everyais":{"$ref":"#/components/schemas/EveryaisOptions"},"models":{"type":"array","maxItems":5,"items":{"type":"string","minLength":1}},"provider":{"$ref":"#/components/schemas/ProviderPreferences"}}},"ResponsesRequest":{"type":"object","description":"Chat model capability and combination restrictions apply. reasoning_effort=none is preserved; unsupported values return 400. response_format and parallel_tool_calls are not supported by this shim; use Chat Completions for those options. Web search is Chat-only.","required":["model","input"],"properties":{"model":{"type":"string","minLength":1},"input":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object","description":"Message with role/content, function_call, or function_call_output."}}]},"instructions":{"type":"string"},"max_output_tokens":{"type":"integer","minimum":1},"temperature":{"type":"number","minimum":0,"maximum":2},"top_p":{"type":"number","minimum":0,"maximum":1},"stream":{"type":"boolean","default":false},"background":{"type":"boolean"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/FunctionTool"}},"tool_choice":{"oneOf":[{"type":"string","enum":["auto","none","required"]},{"type":"object"}]},"reasoning_effort":{"type":"string","enum":["none","low","medium","high"],"description":"Use the model's limits.reasoning_efforts. none explicitly disables reasoning and is never dropped or changed to low; unsupported values return 400."},"everyais":{"$ref":"#/components/schemas/EveryaisOptions"},"models":{"type":"array","maxItems":5,"items":{"type":"string","minLength":1}},"provider":{"$ref":"#/components/schemas/ProviderPreferences"},"user":{"type":"string"}}},"FunctionTool":{"type":"object","required":["type","function"],"properties":{"type":{"type":"string","const":"function"},"function":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"parameters":{"type":"object"},"strict":{"type":"boolean","description":"Model-specific strict function arguments. Gemini 3 uses VALIDATED for auto selection (ANY for forced selection); Gemini 2.5 rejects true with 400. JSON structured_outputs support alone does not guarantee strict tools."}}}}},"ImageGenerationRequest":{"type":"object","required":["model","prompt"],"properties":{"model":{"type":"string"},"prompt":{"type":"string","minLength":1,"maxLength":4000},"n":{"type":"integer","minimum":1,"maximum":10,"default":1},"size":{"type":"string","pattern":"^(?:auto|(?:[1-9][0-9]{0,2}|[1-7][0-9]{3}|80[0-9]{2}|81[0-8][0-9]|819[0-2])x(?:[1-9][0-9]{0,2}|[1-7][0-9]{3}|80[0-9]{2}|81[0-8][0-9]|819[0-2]))$","description":"Each dimension is 1..8192. Only the selected endpoint's approved sizes are accepted; check limits.supported_sizes and parameter_constraints. Omission preserves provider defaults. Gemini may use aspect-ratio aliases; Imagen editing rejects explicit size. Approved gpunode deployments can expose additional dimensions."},"quality":{"type":"string","enum":["standard","hd","low","medium","high","auto"],"description":"Model-specific; check limits.supported_qualities. Gemini/Imagen/Meta reject explicit quality with 400. OpenAI GPT Image defaults to medium on omission; standard is a medium alias and hd is a high alias."},"extra_body":{"type":"object","additionalProperties":false,"properties":{"gpunode":{"type":"object","additionalProperties":false,"properties":{"num_inference_steps":{"type":"integer","minimum":1,"maximum":1000},"guidance_scale":{"type":"number","minimum":0,"maximum":100},"seed":{"type":"integer","minimum":0,"maximum":2147483647},"negative_prompt":{"type":"string","maxLength":4000}}}},"description":"Generation options for enabled, approved gpunode endpoints only. Endpoint limits may be narrower."},"response_format":{"type":"string","enum":["url","b64_json"],"default":"url"},"user":{"type":"string"}}},"ImageEditRequest":{"type":"object","required":["model","prompt","image"],"properties":{"model":{"type":"string","minLength":1},"prompt":{"type":"string","minLength":1,"maxLength":4000},"image":{"type":"string","minLength":1,"description":"Base64-encoded image"},"mask":{"type":"string","description":"Base64-encoded mask. Requires capabilities.image_mask; native Gemini image rejects masks with 400."},"n":{"type":"integer","minimum":1,"maximum":4,"default":1},"size":{"type":"string","pattern":"^(?:auto|(?:[1-9][0-9]{0,2}|[1-7][0-9]{3}|80[0-9]{2}|81[0-8][0-9]|819[0-2])x(?:[1-9][0-9]{0,2}|[1-7][0-9]{3}|80[0-9]{2}|81[0-8][0-9]|819[0-2]))$","description":"Each dimension is 1..8192. Only the selected endpoint's approved sizes are accepted; check limits.supported_sizes and parameter_constraints. Omission preserves provider defaults. Gemini may use aspect-ratio aliases; Imagen editing rejects explicit size. Approved gpunode deployments can expose additional dimensions."},"response_format":{"type":"string","enum":["url","b64_json"],"default":"url"},"user":{"type":"string"}}},"VideoGenerationRequest":{"type":"object","required":["model","prompt"],"properties":{"model":{"type":"string","examples":["everyais/veo-3-1-generate-001"]},"prompt":{"type":"string","minLength":1,"maxLength":4000},"duration":{"type":"integer","minimum":1,"maximum":120,"description":"Model-specific seconds. Veo 3/3.1: 4,6,8 (1080p/4k requires 8); Veo 2: 5,6,7,8. Veo defaults to 8 when omitted. Omni requires omission and rejects explicit duration with 400. See limits.supported_durations; unsupported combinations return 400."},"pricingVariant":{"type":"string","description":"A key from the model's `pricing.variants[].key`."},"extra_body":{"type":"object","additionalProperties":false,"properties":{"google":{"type":"object","additionalProperties":false,"properties":{"negativePrompt":{"type":"string","maxLength":4000},"seed":{"type":"integer","minimum":0,"maximum":4294967295},"enhancePrompt":{"type":"boolean"}}},"gpunode":{"type":"object","additionalProperties":false,"properties":{"size":{"type":"string","pattern":"^(?:auto|(?:[1-9][0-9]{0,2}|[1-7][0-9]{3}|80[0-9]{2}|81[0-8][0-9]|819[0-2])x(?:[1-9][0-9]{0,2}|[1-7][0-9]{3}|80[0-9]{2}|81[0-8][0-9]|819[0-2]))$","description":"Each dimension is 1..8192. Only the selected endpoint's approved sizes are accepted; check limits.supported_sizes and parameter_constraints. Omission preserves provider defaults. Gemini may use aspect-ratio aliases; Imagen editing rejects explicit size. Approved gpunode deployments can expose additional dimensions."},"fps":{"type":"integer","minimum":1,"maximum":60},"num_frames":{"type":"integer","minimum":1,"maximum":7200},"num_inference_steps":{"type":"integer","minimum":1,"maximum":1000},"seed":{"type":"integer","minimum":0,"maximum":2147483647},"negative_prompt":{"type":"string","maxLength":4000}},"dependentRequired":{"fps":["num_frames"],"num_frames":["fps"]}}},"description":"Use options for the selected provider only. gpunode requires approved endpoint limits; fps and num_frames must be supplied together."},"user":{"type":"string"}}},"VideoJob":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"video.generation.job"},"created":{"type":"integer"},"model":{"type":"string"},"status":{"type":"string","enum":["processing","completed","failed","cancelled"]},"durationSeconds":{"type":"integer"},"data":{"type":"array","items":{"type":"object"}},"error":{"type":"object"}}},"Model":{"type":"object","properties":{"id":{"type":"string"},"aliases":{"type":"array","items":{"type":"string"},"description":"Public inbound names that resolve to this id (last-segment, dotted versions, curated Cursor/OpenAI ids). Not extra catalog rows."},"object":{"type":"string","const":"model"},"owned_by":{"type":"string"},"created":{"type":"integer"},"released_at":{"type":["string","null"],"format":"date"},"registered_at":{"type":"string","format":"date"},"updated_at":{"type":["string","null"],"format":"date-time","description":"Last catalog update timestamp. null when unavailable."},"name":{"type":"string"},"description":{"type":["string","null"]},"series":{"type":["string","null"]},"input_modalities":{"type":"array","items":{"type":"string"}},"output_modalities":{"type":"array","items":{"type":"string"}},"knowledge_cutoff":{"type":["string","null"],"format":"date"},"price_search_per_query":{"type":["number","null"],"description":"Reference cost per search billing unit (USD): an executed Google query or a search-enabled Z.AI request. null when unsupported or when no public reference cost is available; use capabilities.web_search for support."},"supply":{"type":"string","enum":["first_party","community","mixed","none"],"description":"Where this model is served from. `first_party` = clouds everyais contracts directly. `community` = third-party supplier GPUs; your prompts are processed on hardware everyais does not operate. `mixed` = both are available for this model. Accounts have community supply disabled by default; enable it in dashboard settings."},"training_use":{"type":"string","enum":["never","opt_in","mixed","none"],"description":"Whether the provider uses your prompts and completions to train their models. `never` = no endpoint for this model does (the default for everything we sell). `opt_in` = every endpoint is a training tier: the provider trains on your data in exchange for discounted pricing, and the model is only callable by accounts that explicitly opted in. `mixed` = both exist; accounts that did not opt in are served only by the non-training endpoints. Accounts have training use disabled by default; enable it in dashboard settings. Organization keys follow the organization setting."},"category":{"type":"string","enum":["LLM","IMAGE","VIDEO"]},"type":{"type":"string"},"supported_endpoints":{"type":"array","items":{"type":"string"}},"parameter_constraints":{"type":"array","description":"Per-route parameter facts, shared by live model documentation and Playground. Do not union allowed values across routes; use their intersection for guaranteed support. capabilities/limits remain the common guarantees. Field may be absent during rolling deployments.","items":{"$ref":"#/components/schemas/EndpointParameterConstraints"}},"capabilities":{"type":"object","description":"Optional booleans: true = supported, false = unsupported, omitted = unverified. Multiple provider routes expose only their common guarantees.","properties":{"streaming":{"type":"boolean"},"tool_use":{"type":"boolean"},"vision":{"type":"boolean"},"json_mode":{"type":"boolean"},"structured_outputs":{"type":"boolean","description":"Native strict JSON Schema output support; distinct from best-effort json_mode. Strict function-tool arguments have separate model restrictions."},"json_mode_with_tools":{"type":"boolean","description":"Whether JSON output may be combined with tools. false rejects the combination; omitted means unverified."},"web_search_with_tools":{"type":"boolean","description":"Whether web search may be combined with function tools. false rejects the combination; omitted means unverified."},"sampling":{"type":"boolean"},"parallel_tool_calls":{"type":"boolean"},"reasoning":{"type":"boolean"},"web_search":{"type":"boolean"},"image_generation":{"type":"boolean"},"image_editing":{"type":"boolean"},"image_mask":{"type":"boolean"},"video_generation":{"type":"boolean"}}},"limits":{"type":"object","description":"Omitted values are unverified, empty lists mean no supported values. Endpoint-specific combinations and generation/editing restrictions still apply.","properties":{"max_tokens":{"type":["integer","null"]},"context_window":{"type":["integer","null"]},"max_images":{"type":"integer"},"max_duration_seconds":{"type":"integer"},"supported_sizes":{"type":"array","items":{"type":"string"},"description":"For Gemini images these are aspect-ratio aliases, not exact pixel guarantees."},"supported_formats":{"type":"array","items":{"type":"string"}},"reasoning_efforts":{"type":"array","items":{"type":"string","enum":["none","low","medium","high"]}},"supported_qualities":{"type":"array","items":{"type":"string"}},"supported_durations":{"type":"array","items":{"type":"integer"}}}},"pricing":{"$ref":"#/components/schemas/ModelPricing"},"available":{"type":"boolean"},"discount_percent":{"type":["number","null"],"minimum":0,"maximum":100,"description":"Current public ALL_USERS promotion discount. Model-specific promotions take precedence over global promotions."}}},"EndpointParameterConstraints":{"type":"object","required":["provider","parameters"],"properties":{"provider":{"type":"string","description":"Normalized provider slug. Contains no private endpoint ID, credentials, or costs."},"parameters":{"type":"object","description":"Operation-specific API parameter keys, including dotted keys such as response_format.type and extra_body.google.top_k. Generation and editing can differ.","properties":{"chat":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ParameterConstraint"}},"image-generation":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ParameterConstraint"}},"image-edit":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ParameterConstraint"}},"video":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ParameterConstraint"}}}}}},"ParameterConstraint":{"type":"object","description":"Adapter-supported parameter facts for this route. Omitted fields mean unverified, not unrestricted. Explicit unsupported parameters or values return 400 unsupported_parameter with error.param before credit reservation.","properties":{"supported":{"type":"boolean"},"type":{"type":"string","enum":["string","number","integer","boolean","array","object"]},"allowed_values":{"type":"array","items":{"type":["string","number","boolean"]}},"minimum":{"type":"number"},"maximum":{"type":"number"}}},"ModelPricing":{"type":"object","description":"Lowest eligible endpoint reference prices, including model discounts. Token input and output come from one complete endpoint pair with the lowest summed rate. The billed amount is calculated separately using the account rate.","required":["unit"],"properties":{"conditions":{"$ref":"#/components/schemas/PublicPriceConditions"},"is_free":{"type":"boolean","description":"True only when customer input, output, and cache tokens are free. Web search is billed separately. Do not infer free pricing from a numeric price of 0; absent or false does not mean free."},"unit":{"type":"string","enum":["per_1m_tokens","per_image","per_second","per_request"]},"input_per_1m":{"type":"number"},"output_per_1m":{"type":"number"},"cache_read_per_1m":{"type":"number"},"cache_write_per_1m":{"type":"number"},"long_context":{"$ref":"#/components/schemas/LongContextPricing"},"per_image":{"type":"number"},"per_second":{"type":"number"},"list":{"type":"object","description":"Provider list price (before discount) for the same units as above. Present only when the model has a list price; the shown rates already include the discount.","properties":{"input_per_1m":{"type":"number"},"output_per_1m":{"type":"number"},"cache_read_per_1m":{"type":"number"},"cache_write_per_1m":{"type":"number"},"per_image":{"type":"number"},"per_second":{"type":"number"}}},"discount_percent":{"type":"number","description":"Discount of the shown rates relative to `list`, in percent (most conservative across units). Present only together with `list`."},"variants":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"price":{"type":"number"},"meta":{"type":"object"}}}}}},"PublicPriceConditions":{"type":"array","minItems":1,"uniqueItems":true,"items":{"type":"string","enum":["community_supply","training_use"]},"description":"Consent required to access the displayed lowest rates: community_supply permits third-party supply, and training_use permits the provider to train on prompts and responses. These price conditions are separate from the model's overall supply and training-use classification."},"LongContextPricing":{"type":"object","description":"The lowest eligible complete long-context input/output rate pair when a request's input-token count exceeds threshold_tokens. The base_* aliases carry the same reference values for contract compatibility.","required":["threshold_tokens","base_input_per_1m","base_output_per_1m","input_per_1m","output_per_1m"],"properties":{"threshold_tokens":{"type":"integer","minimum":1,"example":272000,"description":"Model-specific exclusive boundary in input tokens; input equal to this value uses standard pricing, and only larger values use long-context pricing."},"base_input_per_1m":{"type":"number"},"base_output_per_1m":{"type":"number"},"input_per_1m":{"type":"number"},"output_per_1m":{"type":"number"},"cache_read_per_1m":{"type":"number"}}}},"parameters":{"IdempotencyKey":{"name":"Idempotency-Key","in":"header","schema":{"type":"string","maxLength":255},"description":"Reuse for an identical body with the same API key, route, and authorization policy. Records last 24 hours. Successful JSON up to 300 KiB is replayed with Idempotent-Replayed: true. In-progress requests, body conflicts, and non-replayable SSE/large successes return 409. Storage outages may bypass deduplication. Not supported for video submission."}},"responses":{"ApiError":{"description":"OpenAI-compatible error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}