{"openapi":"3.0.3","info":{"title":"GetVibe API","version":"1.0.0","contact":{"name":"GetVibe Support","url":"https://getvibeapi.com/docs"},"description":"OpenAI-compatible API for top LLMs and media generation. US endpoint, payment in USD. Base URL for /v1/* — https://getvibeapi.com/v1; for /api/* — https://getvibeapi.com."},"servers":[{"url":"https://getvibeapi.com","description":"GetVibe API"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"Chat","description":"Chat endpoints (OpenAI, Anthropic, Responses)"},{"name":"Models","description":"Model management"},{"name":"Embeddings","description":"Text vector representations"},{"name":"Media","description":"Image, video, and audio generation"},{"name":"Billing","description":"Balance and usage history"},{"name":"Support","description":"Support tickets"},{"name":"Catalogs","description":"Public catalogs (no authentication)"},{"name":"Supplier","description":"Supplier marketplace machine API (supplier-scoped keys)"}],"paths":{"/v1/chat/completions":{"post":{"tags":["Chat"],"summary":"Create chat completion","description":"OpenAI-compatible chat endpoint. Authenticate with Authorization: Bearer sk-pv-…","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletionRequest"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletionResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/messages":{"post":{"tags":["Chat"],"summary":"Create message (Anthropic format)","description":"Anthropic Messages endpoint for Claude Code and the Anthropic SDK. Authenticate with x-api-key: sk-pv-… or Authorization: Bearer sk-pv-…","security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessagesRequest"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessagesResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/responses":{"post":{"tags":["Chat"],"summary":"Create response (OpenAI Responses API)","description":"Responses API endpoint for Codex CLI (wire_api = \"responses\"). Authenticate with Authorization: Bearer sk-pv-…","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponsesRequest"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponsesResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/models":{"get":{"tags":["Models"],"summary":"List models","description":"Lists public model IDs as vendor/model (OpenRouter-style), e.g. anthropic/claude-opus-5. The bare claude-opus-5 spelling is an accepted input alias with identical billing. model:alias pins select a channel, e.g. openai/gpt-5.6-sol:yellow. GET /v1/models lists one ID per model by default; add ?variants=1 for the full list.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Model list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelsResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/v1/model-capabilities":{"get":{"tags":["Models"],"summary":"Discover model capabilities","description":"The complete machine-readable contract for authenticated clients. For media, use operations[].requestJsonSchema (JSON Schema draft 2020-12) as the exact submit-body schema, and providerVariants to choose an available route. requestSchema and conditionalRequirements remain compatibility annotations. operation.id is discovery metadata and is not sent to POST /api/media/generate.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Model capabilities, operations, provider variants, and pricing status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelCapabilitiesResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/v1/embeddings":{"post":{"tags":["Embeddings"],"summary":"Create embeddings","description":"Text embeddings for search, RAG, and clustering.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbeddingRequest"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbeddingResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"}}}},"/v1/audio/speech":{"post":{"tags":["Media"],"summary":"Create speech audio","description":"OpenAI-compatible speech synthesis. The request is JSON with model, input, and optional voice, response_format, and speed. The response is audio bytes; use the model page for the currently available native formats.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudioSpeechRequest"}}}},"responses":{"200":{"description":"Generated audio bytes","content":{"*/*":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Invalid request or unsupported audio format"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"502":{"description":"Speech provider failed or returned unavailable audio"}}}},"/v1/audio/transcriptions":{"post":{"tags":["Media"],"summary":"Transcribe an audio file","description":"OpenAI-compatible multipart transcription. Send file and model fields; language is optional. The default response is JSON with text.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/AudioTranscriptionRequest"}}}},"responses":{"200":{"description":"Transcribed text","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudioTranscriptionResponse"}}}},"400":{"description":"Invalid multipart request"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"502":{"description":"Transcription provider failed"}}}},"/v1/images/generations":{"post":{"tags":["Media"],"summary":"Generate an image (OpenAI-compatible, synchronous)","description":"OpenAI-compatible image generation. Submits through the same pipeline as POST /api/media/generate — identical model resolution, price quote and debit — and holds the request until the job is terminal. Only a completed generation is charged. Every response carries x-pv-media-job-id; on a timeout, collect the result from GET /api/media/jobs/{id} or GET /v1/images/generations.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageGenerationRequest"}}}},"responses":{"200":{"description":"Generated image","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageGenerationResponse"}}}},"400":{"description":"Unknown parameter, unsupported size/quality, or a non-image model"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"404":{"description":"Unknown model"},"502":{"description":"Generation failed; nothing was charged"},"504":{"description":"Still running at the deadline; the body and x-pv-media-job-id name the job"}}},"get":{"tags":["Media"],"summary":"List this key’s image generations","description":"Owner-scoped recovery list. Exists because a synchronous generation can outlive the connection that requested it: a caller who hangs up mid-wait finds the finished (and charged) job here.","security":[{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"Recent image jobs, newest first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageGenerationListResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/api/media/generate":{"post":{"tags":["Media"],"summary":"Create media generation job (async)","description":"Asynchronous media generation. First fetch authenticated /v1/model-capabilities for the allowed model/alias, opts, enum values, and conditional requirements for each operation. operation.id is discovery metadata only and is not sent in the request. Returns a jobId to poll at /api/media/jobs/{id}.","security":[{"bearerAuth":[]}],"parameters":[{"name":"x-getvibe-strict","in":"header","required":false,"schema":{"type":"string","enum":["1","true"]},"description":"Strict mode, same as body strict: true."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A retry with the same key returns the same jobId; no second job, no second charge."},{"name":"x-pv-sandbox-outcome","in":"header","required":false,"schema":{"type":"string","enum":["submission_uncertain"]},"description":"Sandbox keys only: simulate a submit whose outcome is unknown. Returns 202 with a jobId whose poll answers stage submission_unknown for 60 seconds, then submission_not_started (charged: false). Nothing is stored, sent to a supplier or charged. A regular key with this header gets 400 sandbox_outcome_requires_sandbox_key."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaGenerateRequest"}}}},"responses":{"202":{"description":"Job created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaGenerateResponse"}}}},"400":{"description":"Invalid JSON or body; unknown top-level field (code unknown_field)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaErrorResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"409":{"description":"quote_id is stale, used or the lane moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaErrorResponse"}}}},"422":{"description":"Unsupported model or opts combination, unmet operation requirements, strict_validation_failed or media_max_price_exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaErrorResponse"}}}},"502":{"description":"Provider did not accept the job"},"503":{"description":"Model route is temporarily unavailable"}}}},"/api/media/public-price":{"post":{"tags":["Media"],"summary":"Quote public media price","description":"No authentication is required and no generation is started. Pass the exact model and opts from /v1/model-capabilities to get the current price. Do not use fromRub from /api/media-catalog as an exact price.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaPriceRequest"}}}},"responses":{"200":{"description":"Current price in USD","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaPriceResponse"}}}},"400":{"description":"Invalid request body"},"404":{"description":"Unknown public media model"},"422":{"description":"Unsupported opts combination for price calculation"},"503":{"description":"Price is temporarily unavailable"}}}},"/api/media/price":{"post":{"tags":["Media"],"summary":"Quote authenticated media price","description":"Authenticated equivalent of the public price check for exact model and opts; does not start generation.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaPriceRequest"}}}},"responses":{"200":{"description":"Current price in USD","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaPriceResponse"}}}},"400":{"description":"Invalid body; unknown top-level field (code unknown_field)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaErrorResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"422":{"description":"Unsupported opts combination for price calculation"},"500":{"description":"Price calculation is temporarily unavailable"},"503":{"description":"Price is temporarily unavailable"}}}},"/api/media/jobs/{id}":{"get":{"tags":["Media"],"summary":"Get media job status","description":"Poll the status of an asynchronous media generation job. For submitting + media_submission_uncertain, follow retryGuidance: keep polling the same jobId and do not create a duplicate automatically.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Job ID (jobId)"}],"responses":{"200":{"description":"Job status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaJobResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/api/media/voices":{"get":{"tags":["Media"],"summary":"List cloned voices","description":"The caller’s cloned voices for voice-clone-tts and elevenlabs-voice-changer, with creation, storage and synthesis prices.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Voices and pricing","content":{"application/json":{"schema":{"type":"object","properties":{"voices":{"type":"array","items":{"$ref":"#/components/schemas/Voice"}},"pricing":{"type":"object","additionalProperties":true}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}},"post":{"tags":["Media"],"summary":"Clone a voice (one or several samples)","description":"Every sample is downloaded and measured before the supplier is called. Errors: 422 voice_request_invalid, voice_sample_invalid, voice_sample_too_large, voice_sample_unreachable, voice_samples_invalid (shorter than the engine minimum together), voice_samples_limit (over 25 recordings or 300 seconds), voice_samples_too_large (over 50 MB together); 409 voice_slots_full; 413 payload_too_large.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceCreateRequest"}}}},"responses":{"201":{"description":"Voice created","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"voice":{"$ref":"#/components/schemas/Voice"},"charged":{"type":"object","properties":{"amount":{"type":"number"},"currency":{"type":"string"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"409":{"description":"voice_slots_full","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaErrorResponse"}}}},"413":{"description":"payload_too_large: body over 70 953 644 bytes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaErrorResponse"}}}},"422":{"description":"Invalid request or samples","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaErrorResponse"}}}}}}},"/api/media/voices/{id}":{"delete":{"tags":["Media"],"summary":"Delete a cloned voice","description":"Removes the voice here and at the supplier. Dashboard session only: an API key answers 403 session_required. Unknown, deleted and other clients’ ids answer 404 voice_not_found.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"voice_… id"}],"responses":{"200":{"description":"Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"description":"session_required: called with an API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaErrorResponse"}}}},"404":{"description":"voice_not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaErrorResponse"}}}}}}},"/api/media/voices/{id}/samples":{"post":{"tags":["Media"],"summary":"Append samples to an ElevenLabs voice","description":"Free. Errors: 404 voice_not_found; 409 voice_samples_unsupported (standard or premium voice); 422 voice_samples_limit (over 25 recordings or 300 seconds with what the voice holds); 429 voice_samples_rate_limited (20 additions per 24 h); 413 payload_too_large; 502 voice_samples_failed (supplier refused; voice unchanged).","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"voice_… id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceSamplesAddRequest"}}}},"responses":{"200":{"description":"Samples added","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"voice":{"$ref":"#/components/schemas/Voice"},"samples_added":{"type":"integer"},"sample_count":{"type":"integer","nullable":true}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"voice_not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaErrorResponse"}}}},"409":{"description":"voice_samples_unsupported","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaErrorResponse"}}}},"413":{"description":"payload_too_large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaErrorResponse"}}}},"422":{"description":"voice_samples_limit or invalid samples","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaErrorResponse"}}}},"429":{"description":"voice_samples_rate_limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaErrorResponse"}}}}}}},"/api/media/veo/extend/price":{"post":{"tags":["Media"],"summary":"Quote Veo 3.1 extension","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["tier"],"properties":{"tier":{"type":"string","enum":["lite","fast","quality"]}}}}}},"responses":{"200":{"description":"Current RUB quote"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/api/media/veo/extend":{"post":{"tags":["Media"],"summary":"Extend a completed Veo 3.1 job","security":[{"bearerAuth":[]}],"description":"Creates a new asynchronous job. taskId is the owned GetVibe jobId of a completed Veo 3.1 generation.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["taskId","prompt","tier"],"properties":{"taskId":{"type":"string"},"prompt":{"type":"string"},"tier":{"type":"string","enum":["lite","fast","quality"]},"seeds":{"type":"integer"},"watermark":{"type":"string"}}}}}},"responses":{"202":{"description":"Extension job created"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/decisions":{"post":{"tags":["Models"],"summary":"Evaluate decisions","description":"Evaluates named questions against a state and returns a probabilistic answer per question. This is NOT a chat endpoint: the decisions model is not accepted by /v1/chat/completions. Billed on input tokens only; output tokens are free. The same endpoint is also served at POST /v1/systemone (the TypeSafe SDK path), which accepts the SDK model names jev-latest, jev-1.14 and jev-1.13. Answer shapes: choice -> choice/probabilities/confidence, score -> score/legend/probabilities/confidence, noul -> noul, box -> box/confidence.","security":[{"bearerAuth":[]}],"parameters":[{"name":"TypeSafe-Danger-Zone-Long-Context","in":"header","required":false,"description":"Experimental, typesafe/jev-1.14: `true` raises the per-request and per-question context to 262K tokens (default 64K/32K). Same price; slower and less accurate.","schema":{"type":"string","enum":["true"]}},{"name":"TypeSafe-Danger-Zone-Images","in":"header","required":false,"description":"Experimental, typesafe/jev-1.14: `true` enables `assets` (images) and `box` questions. Without it such a request is refused with 400.","schema":{"type":"string","enum":["true"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1DecisionRequest"}}}},"responses":{"200":{"description":"Decision answers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecisionResponse"}}}},"400":{"description":"Malformed request or unknown decisions model."},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"502":{"description":"The decisions service returned an error."},"504":{"description":"The decisions service timed out."}}}},"/v1/balance":{"get":{"tags":["Billing"],"summary":"Get balance","description":"Returns the remaining prepaid balance in USD.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Balance remaining","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BalanceResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/v1/generations":{"get":{"tags":["Billing"],"summary":"List usage history","description":"Paginated usage history with date filters.","security":[{"bearerAuth":[]}],"parameters":[{"name":"page","in":"query","schema":{"type":"integer","default":1}},{"name":"limit","in":"query","schema":{"type":"integer","default":20,"maximum":100}},{"name":"dateFrom","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"dateTo","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"api_key_id","in":"query","schema":{"type":"string"},"description":"Only records made with this key of your account (404 if the key is not yours)."},{"name":"key","in":"query","schema":{"type":"string","enum":["current"]},"description":"current: only records made with the key that authenticates this request."}],"responses":{"200":{"description":"Usage history","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerationsResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/v1/generations/{id}":{"get":{"tags":["Billing"],"summary":"Get a single usage record","description":"Returns one usage record by ID. Access is restricted to the key owner.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Record ID from the /v1/generations response or x-pv-generation-id header."}],"responses":{"200":{"description":"Usage record","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerationRecord"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/pricing":{"get":{"tags":["Models","Billing"],"summary":"Get pricing","description":"Current prices of every catalog model, projected from /api/catalog. On this site most channels are marketplace fills: variants[].inputRub/outputRub (USD here) is the CHEAPEST rung, not a fixed price. Each row also carries pricing (priceFrom / priceTypical / priceTo and a link to the ladder) and channels[] with the same range per channel.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Account pricing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PricingResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/v1/messages/count_tokens":{"post":{"tags":["Chat"],"summary":"Count tokens (Anthropic stub)","description":"Compatibility stub for the Anthropic SDK and Claude Code, which call it before sending a request. Estimates input tokens using a heuristic (~4 characters per token), not an exact tokenizer.","security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string","example":"claude-opus-4.8"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/Message"}},"system":{"type":"string"}}}}}},"responses":{"200":{"description":"Estimated input token count","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CountTokensResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/api/media/file/{id}/{idx}":{"get":{"tags":["Media"],"summary":"Get media file (signed proxy)","description":"Signed HMAC proxy URL for a generated result (image, video, audio, or 3D model). The URL carries sig in the query and opens without an API key; it can be used in <img>, <video>, or a browser. The upstream provider is hidden. With download=1, the file is returned as an attachment with a name and extension based on its contents (for example, .glb for a 3D model).","security":[],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Job ID (jobId) from the /api/media/jobs/{id} response."},{"name":"idx","in":"path","required":true,"schema":{"type":"integer"},"description":"Result index (zero-based)."},{"name":"sig","in":"query","required":true,"schema":{"type":"string"},"description":"HMAC signature from the job resultUrls. Required; otherwise returns 404."},{"name":"download","in":"query","required":false,"schema":{"type":"string","enum":["1"]},"description":"download=1 returns the file as an attachment (Content-Disposition: attachment) with a name and extension based on its contents."}],"responses":{"200":{"description":"Binary file (image/*, video/*, audio/*, or model/gltf-binary)","content":{"image/*":{"schema":{"type":"string","format":"binary"}},"video/*":{"schema":{"type":"string","format":"binary"}},"audio/*":{"schema":{"type":"string","format":"binary"}},"model/gltf-binary":{"schema":{"type":"string","format":"binary"}}}},"404":{"$ref":"#/components/responses/NotFound"}}}},"/api/catalog":{"get":{"tags":["Catalogs"],"summary":"Public text model catalog","description":"Public text model catalog (no auth). On this site most channels are marketplace fills billed at the rung that fills plus our commission: variants[].inputUsd and channels[].inputUsd are the cheapest rung (priceFrom). pricing and channels[] publish priceFrom / priceTypical / priceTo, computed by the same code as /api/model-ladder.","security":[],"responses":{"200":{"description":"Model catalog","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogResponse"}}}}}}},"/api/media-catalog":{"get":{"tags":["Catalogs"],"summary":"Public media catalog","description":"Legacy media model catalog in an object wrapper. It does not include the complete per-operation schema: use /v1/model-capabilities for standalone clients and POST /api/media/public-price for an exact model+opts price.","security":[],"responses":{"200":{"description":"Media model catalog","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaCatalogResponse"}}}}}}},"/v1/tickets":{"post":{"tags":["Support"],"operationId":"createTicket","summary":"Open a support ticket","description":"Opens a support ticket (API key or dashboard session). JSON, or multipart/form-data with up to 5 PNG/JPEG/GIF/WebP images in `files` (10 MB each, 10 per ticket). An identical open ticket (same category, subject, message and requestIds — or the same clientIncidentId) is not duplicated: its occurrences grow and 200 is returned. Limit: 10 new tickets per hour per account. Ticket text is read by support staff as untrusted data; it never triggers balance, refund or access changes.","security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketCreateRequest"}},"multipart/form-data":{"schema":{"allOf":[{"$ref":"#/components/schemas/TicketCreateRequest"},{"type":"object","properties":{"files":{"type":"array","maxItems":5,"items":{"type":"string","format":"binary"}}}}]}}}},"responses":{"200":{"description":"Matching open ticket found; occurrences incremented","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketCreateResponse"}}}},"201":{"description":"Ticket created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketCreateResponse"}}}},"400":{"description":"Invalid fields, too many files, or a request ID that is not yours","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketError"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"413":{"description":"File or body too large"},"415":{"description":"Attachment is not a PNG/JPEG/GIF/WebP image"},"429":{"$ref":"#/components/responses/RateLimited"}}},"get":{"tags":["Support"],"operationId":"listTickets","summary":"List your tickets","description":"Your own tickets, newest first, cursor-paginated. Pass nextCursor as `after` for the next page.","security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"name":"after","in":"query","schema":{"type":"string"},"description":"nextCursor from the previous page"},{"name":"status","in":"query","schema":{"type":"string","enum":["open","replied","closed"]}}],"responses":{"200":{"description":"Ticket page","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketList"}}}},"400":{"description":"Invalid limit, status or cursor"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/v1/tickets/{id}":{"get":{"tags":["Support"],"operationId":"getTicket","summary":"Get a ticket with its thread","description":"Ticket status and the whole thread: your messages and staff replies in time order. Foreign or unknown IDs return 404.","security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Ticket","content":{"application/json":{"schema":{"type":"object","required":["ticket"],"properties":{"ticket":{"$ref":"#/components/schemas/TicketThread"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/tickets/{id}/messages":{"post":{"tags":["Support"],"operationId":"addTicketMessage","summary":"Add a follow-up message","description":"Adds your message to the ticket (JSON `{\"message\": \"...\"}` or multipart with `files`). A replied ticket becomes open again; a closed ticket returns 409 — open a new one. Limit: 60 messages per hour per account.","security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["message"],"additionalProperties":false,"properties":{"message":{"type":"string","minLength":1,"maxLength":8000}}}}}},"responses":{"201":{"description":"Message added; the updated thread","content":{"application/json":{"schema":{"type":"object","properties":{"ticket":{"$ref":"#/components/schemas/TicketThread"}}}}}},"400":{"description":"Invalid message or too many files"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"The ticket is closed"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/tickets/{id}/close":{"post":{"tags":["Support"],"operationId":"closeTicket","summary":"Close a ticket","description":"Closes your ticket. Idempotent.","security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Closed ticket","content":{"application/json":{"schema":{"type":"object","properties":{"ticket":{"$ref":"#/components/schemas/Ticket"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/tickets/{id}/attachments/{attachmentId}":{"get":{"tags":["Support"],"operationId":"getTicketAttachment","summary":"Download a ticket attachment","security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"attachmentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Image bytes","content":{"image/*":{"schema":{"type":"string","format":"binary"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/technical-feedback":{"post":{"tags":["Support"],"deprecated":true,"summary":"Report a technical issue (alias of POST /v1/tickets)","description":"Creates a technical support ticket for manual review. If a matching active ticket exists, returns that ticket. It cannot change balances, access, settings, or deployments.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TechnicalFeedbackRequest"}}}},"responses":{"200":{"description":"Matching active ticket found and merged","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TechnicalFeedbackCreateResponse"}}}},"201":{"description":"New ticket created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TechnicalFeedbackCreateResponse"}}}},"400":{"description":"Invalid body or request ID does not belong to this client"},"401":{"$ref":"#/components/responses/Unauthorized"},"422":{"description":"Ticket contains a non-technical operational instruction"}}}},"/v1/technical-feedback/{id}":{"get":{"tags":["Support"],"deprecated":true,"summary":"Get a technical issue (alias of GET /v1/tickets/{id})","description":"Returns only a ticket owned by the API key holder.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Ticket ID"}],"responses":{"200":{"description":"Ticket","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TechnicalFeedbackGetResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/api/marketplace/suppliers/api/v1/connections":{"get":{"tags":["Supplier"],"operationId":"listSupplierConnections","summary":"List the supplier’s connected accounts","description":"Accounts connected by the authenticated supplier, each with its verification state, serving models, proxy and payable earnings. Scoped to the supplier resolved from the bearer key.","security":[{"supplierBearerAuth":[]}],"responses":{"200":{"description":"The supplier’s connections","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierConnectionsResponse"}}}},"401":{"$ref":"#/components/responses/SupplierUnauthorized"},"429":{"$ref":"#/components/responses/SupplierRateLimited"}}},"post":{"tags":["Supplier"],"operationId":"createSupplierConnections","summary":"Create one or many connections from an obtained credential bundle","description":"Creates connections for the authenticated supplier from an already-obtained credential bundle (a Codex auth.json, Claude access + refresh tokens, an Antigravity refresh token, or a subscription API key). The body is one item, { \"items\": [...] }, or a bare array. The egress proxy is proved first: an own proxy must resolve only to public addresses and tunnel to a neutral check target, or the item is refused as proxy_invalid / probe_failed. Where the vendor offers a definitive non-billable check (Codex, Claude Code, the Alibaba plan) the credential is proved through that proxy before anything is written and the item returns verificationState verified; for the other providers no such check exists, so the credential is stored encrypted as unverified and the first real routed request verifies or rejects it. The result is per item, so one bad account never fails the pack. An item may name its own proxy or a preferred country; with neither, the server assigns and proves one, and refuses the item as proxy_unavailable when none can be proved. The older /connections/batch path is an alias of the same handler.","security":[{"supplierBearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierConnectionsCreateRequest"}}}},"responses":{"200":{"description":"Per-item results. accepted + rejected = results.length.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierBatchResponse"}}}},"400":{"$ref":"#/components/responses/SupplierBadRequest"},"401":{"$ref":"#/components/responses/SupplierUnauthorized"},"429":{"$ref":"#/components/responses/SupplierRateLimited"}}}},"/api/marketplace/suppliers/api/v1/offers":{"get":{"tags":["Supplier"],"operationId":"listSupplierOffers","summary":"List the supplier’s offers and current prices","description":"Offers with the current per-1M-token micros prices, the live percentage of the official card, cooldown state and concurrency cap.","security":[{"supplierBearerAuth":[]}],"responses":{"200":{"description":"The supplier’s offers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierOffersResponse"}}}},"401":{"$ref":"#/components/responses/SupplierUnauthorized"},"429":{"$ref":"#/components/responses/SupplierRateLimited"}}}},"/api/marketplace/suppliers/api/v1/offers/{offerId}/price-changes":{"get":{"tags":["Supplier"],"operationId":"listSupplierOfferPriceChanges","summary":"Read the price-change ledger for one offer","description":"Planned, applied and cancelled price changes for one of the supplier’s own offers. An offer id that does not belong to the supplier answers 404.","security":[{"supplierBearerAuth":[]}],"parameters":[{"name":"offerId","in":"path","required":true,"schema":{"type":"string"},"description":"The offer id from the offers list."}],"responses":{"200":{"description":"The price-change ledger","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierPriceChangesResponse"}}}},"401":{"$ref":"#/components/responses/SupplierUnauthorized"},"404":{"$ref":"#/components/responses/SupplierNotFound"},"429":{"$ref":"#/components/responses/SupplierRateLimited"}}}},"/api/marketplace/suppliers/api/v1/stats":{"get":{"tags":["Supplier"],"operationId":"getSupplierStats","summary":"Read the supplier’s marketplace statistics","description":"The same shape the cabinet statistics page shows: lifetime totals, a 14-day daily series and a per-offer breakdown with cache-hit rate and effective-cost rank.","security":[{"supplierBearerAuth":[]}],"responses":{"200":{"description":"Supplier statistics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierStatsResponse"}}}},"401":{"$ref":"#/components/responses/SupplierUnauthorized"},"429":{"$ref":"#/components/responses/SupplierRateLimited"}}}},"/api/marketplace/suppliers/api/v1/earnings":{"get":{"tags":["Supplier"],"operationId":"listSupplierEarnings","summary":"List recent settlement-eligible earnings","description":"Up to 500 recent route attempts, newest first, with token counts and the payable micros for each. Micros are exact decimal strings.","security":[{"supplierBearerAuth":[]}],"responses":{"200":{"description":"Earning events","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierEarningsResponse"}}}},"401":{"$ref":"#/components/responses/SupplierUnauthorized"},"429":{"$ref":"#/components/responses/SupplierRateLimited"}}}},"/api/marketplace/suppliers/api/v1/connections/batch":{"post":{"tags":["Supplier"],"operationId":"onboardSupplierConnectionsBatch","summary":"Onboard connections in bulk","description":"Proves each item against the vendor and writes it independently. Partial success is the contract: a bad row is refused per item and the rest still land. Each item is the same submission the browser connect flow accepts. At most 25 items per call; 20 calls per hour per supplier plus a 120/hour per-IP cap.","security":[{"supplierBearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierBatchRequest"}}}},"responses":{"200":{"description":"Per-item results. accepted + rejected = results.length.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierBatchResponse"}}}},"400":{"$ref":"#/components/responses/SupplierBadRequest"},"401":{"$ref":"#/components/responses/SupplierUnauthorized"},"429":{"$ref":"#/components/responses/SupplierRateLimited"}}}},"/api/marketplace/suppliers/proxy-check":{"post":{"tags":["Supplier"],"operationId":"checkSupplierProxy","summary":"Prove a proxy before connecting an account","description":"Validates a supplier’s own proxy or a country pool through a neutral host. This is a PRE-FLIGHT: the connect endpoint runs the identical check before it exchanges a token or probes the vendor, so this only lets the cabinet and a script fail early. The response never carries the proxy URL, its userinfo or the exit address. It needs a signed-in dashboard session (no supplier key) and is rate-limited per IP; an anonymous call answers 401 and opens no connection.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierProxyCheckRequest"}}}},"responses":{"200":{"description":"The proxy answered","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierProxyCheckResponse"}}}},"400":{"$ref":"#/components/responses/SupplierBadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"409":{"$ref":"#/components/responses/SupplierConflict"},"422":{"description":"The proxy could not be reached.","content":{"application/json":{"schema":{"type":"object","required":["ok","outcome"],"properties":{"ok":{"type":"boolean","enum":[false]},"outcome":{"type":"string","enum":["proxy_failed","proxy_unavailable"]},"error":{"type":"string"}}}}}},"429":{"$ref":"#/components/responses/SupplierRateLimited"}}}},"/api/marketplace/suppliers/me/api-keys":{"get":{"tags":["Supplier"],"operationId":"listSupplierApiKeys","summary":"List the supplier’s machine API keys","description":"Cabinet management route. Uses the supplier cabinet session or tracking token and deliberately does NOT accept a machine key. Returns key metadata only — never the token or its hash.","security":[],"responses":{"200":{"description":"Key metadata","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierApiKeysResponse"}}}},"401":{"$ref":"#/components/responses/SupplierUnauthorized"},"429":{"$ref":"#/components/responses/SupplierRateLimited"}}},"post":{"tags":["Supplier"],"operationId":"createSupplierApiKey","summary":"Mint a machine API key","description":"Cabinet management route — session/tracking auth, never a machine key. The full token is returned exactly once; only its hash is stored. At most 20 active keys per supplier.","security":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierApiKeyCreateRequest"}}}},"responses":{"201":{"description":"The token, shown once","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierApiKeyCreatedResponse"}}}},"400":{"$ref":"#/components/responses/SupplierBadRequest"},"401":{"$ref":"#/components/responses/SupplierUnauthorized"},"409":{"$ref":"#/components/responses/SupplierConflict"},"429":{"$ref":"#/components/responses/SupplierRateLimited"}}}},"/api/marketplace/suppliers/me/api-keys/{id}":{"delete":{"tags":["Supplier"],"operationId":"revokeSupplierApiKey","summary":"Revoke a machine API key","description":"Cabinet management route — session/tracking auth, never a machine key. Scoped by both the key id and the caller, so another supplier’s key cannot be revoked.","security":[],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The key id from the list response."}],"responses":{"200":{"description":"Revocation confirmation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierApiKeyRevokedResponse"}}}},"401":{"$ref":"#/components/responses/SupplierUnauthorized"},"404":{"$ref":"#/components/responses/SupplierNotFound"},"429":{"$ref":"#/components/responses/SupplierRateLimited"}}}},"/api/model-ladder":{"get":{"tags":["Catalogs"],"summary":"Public price ladder","description":"The marketplace books behind each model: every rung (our price per 1M tokens) with the number of offers standing at it. A request fills at the cheapest offer that takes it, so this is the depth behind the pricing.priceFrom / priceTypical / priceTo that /api/catalog and /v1/pricing publish. Each served pool also carries `fill`: the share of our requests and tokens that actually filled at each rung over 24 h and 7 d, and the average price paid. max_price caps the rung a request may fill at. No auth. Refreshed every few minutes; `ageMs` and `stale` say how old it is.","security":[],"parameters":[{"name":"model","in":"query","required":false,"schema":{"type":"string"},"description":"One model (public id, e.g. claude-opus-5.5)."},{"name":"scope","in":"query","required":false,"schema":{"type":"string","enum":["served","market","all"],"default":"served"}}],"responses":{"200":{"description":"The ladder","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Authorization: Bearer sk-pv-…"},"apiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"x-api-key: sk-pv-… (Anthropic format)"},"supplierBearerAuth":{"type":"http","scheme":"bearer","description":"Authorization: Bearer sk-sup-… — a supplier marketplace machine key, minted in the supplier cabinet and shown once."}},"responses":{"Unauthorized":{"description":"Unauthorized — key is missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"PaymentRequired":{"description":"Insufficient balance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"RateLimited":{"description":"Rate limit exceeded (429)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the next retry"}}},"NotFound":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"SupplierUnauthorized":{"description":"Missing, unknown or revoked supplier API key. One fixed message, so the cases cannot be told apart.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierError"}}}},"SupplierNotFound":{"description":"The path does not exist on this project (the marketplace is not enabled), or the addressed offer/key belongs to another supplier.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierError"}}}},"SupplierBadRequest":{"description":"Malformed JSON or a batch over the cap.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierError"}}}},"SupplierConflict":{"description":"The supplier already holds the maximum number of active keys.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierError"}}}},"SupplierRateLimited":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierError"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the next attempt."}}}},"schemas":{"ChatCompletionRequest":{"type":"object","required":["model","messages"],"properties":{"model":{"type":"string","description":"Public model ID in vendor/model form (OpenRouter-style), e.g. anthropic/claude-opus-5. The bare claude-opus-5 spelling is accepted as an input alias and bills identically. model:alias pins a channel, e.g. openai/gpt-5.6-sol:yellow. GET /v1/models lists one ID per model by default; ?variants=1 returns the full list.","example":"anthropic/claude-opus-5"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/Message"}},"stream":{"type":"boolean","description":"Stream the response as server-sent events (SSE)","default":false},"max_tokens":{"type":"integer","description":"Maximum number of tokens in the response"},"temperature":{"type":"number","description":"Sampling randomness, 0–2","default":1},"top_p":{"type":"number"},"reasoning_effort":{"type":"string","enum":["none","minimal","low","medium","high","xhigh","max"],"description":"Reasoning level for Chat Completions. The supported values depend on the model."},"tools":{"type":"array","description":"List of tools (function calling)"},"tool_choice":{"type":"string","description":"auto, none, required or a specific tool"},"response_format":{"type":"object","description":"Force JSON output"}}},"ChatCompletionResponse":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","example":"chat.completion"},"model":{"type":"string"},"choices":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"message":{"$ref":"#/components/schemas/Message"},"finish_reason":{"type":"string"}}}},"usage":{"$ref":"#/components/schemas/Usage"}}},"MessagesRequest":{"type":"object","required":["model","max_tokens","messages"],"properties":{"model":{"type":"string","example":"claude-opus-4.8"},"max_tokens":{"type":"integer"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/Message"}},"system":{"type":"string","description":"System prompt (string or array of blocks with cache_control)"},"stream":{"type":"boolean","default":false},"thinking":{"type":"object","description":"Native Claude thinking (budget_tokens)","properties":{"type":{"type":"string","enum":["enabled","disabled"]},"budget_tokens":{"type":"integer"}}}}},"MessagesResponse":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","example":"message"},"role":{"type":"string","example":"assistant"},"content":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"text":{"type":"string"}}}},"model":{"type":"string"},"stop_reason":{"type":"string"},"usage":{"type":"object","properties":{"input_tokens":{"type":"integer"},"output_tokens":{"type":"integer"}}}}},"ResponsesRequest":{"type":"object","required":["model","input"],"properties":{"model":{"type":"string","example":"gpt-5.6"},"input":{"description":"String or array of input messages"},"reasoning":{"type":"object","description":"Reasoning settings. Supported values depend on the model.","properties":{"effort":{"type":"string","enum":["none","minimal","low","medium","high","xhigh","max"]},"summary":{"type":"string","enum":["auto","concise","detailed"]}}},"stream":{"type":"boolean","default":false}}},"ResponsesResponse":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","example":"response"},"model":{"type":"string"},"output":{"type":"array"},"usage":{"$ref":"#/components/schemas/Usage"}}},"Message":{"type":"object","properties":{"role":{"type":"string","enum":["system","user","assistant","tool"]},"content":{"description":"String or array of blocks (text, image_url)"}}},"Usage":{"type":"object","properties":{"prompt_tokens":{"type":"integer"},"completion_tokens":{"type":"integer"},"total_tokens":{"type":"integer"}}},"ModelsResponse":{"type":"object","properties":{"object":{"type":"string","example":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","example":"model"}}}}}},"EmbeddingRequest":{"type":"object","required":["model","input"],"properties":{"model":{"type":"string","example":"qwen3-embedding-8b"},"input":{"description":"String or array of strings (batch)"},"encoding_format":{"type":"string","enum":["float","base64"],"default":"float"}}},"EmbeddingResponse":{"type":"object","properties":{"object":{"type":"string","example":"list"},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","example":"embedding"},"index":{"type":"integer"},"embedding":{"type":"array","items":{"type":"number"}}}}},"model":{"type":"string"},"usage":{"$ref":"#/components/schemas/Usage"}}},"ImagesRequest":{"type":"object","required":["model","prompt"],"properties":{"model":{"type":"string","example":"gpt-image-2"},"prompt":{"type":"string"},"n":{"type":"integer","default":1},"size":{"type":"string","example":"1024x1024"},"quality":{"type":"string","enum":["low","medium","high"]}}},"ImagesResponse":{"type":"object","properties":{"created":{"type":"integer"},"data":{"type":"array","items":{"type":"object","properties":{"b64_json":{"type":"string"},"revised_prompt":{"type":"string","nullable":true}}}},"usage":{"$ref":"#/components/schemas/Usage"}}},"MediaGenerateRequest":{"type":"object","required":["model"],"additionalProperties":false,"description":"Any other top-level field is refused with 400 unknown_field (the same rule on /api/media/price).","properties":{"model":{"type":"string","minLength":1,"example":"veo-3.1","description":"Public model ID or supported provider alias from /v1/model-capabilities."},"prompt":{"type":"string","description":"Required only when the selected operation contract requires it. URL-only utility operations may omit it."},"opts":{"type":"object","additionalProperties":true,"description":"Model- and operation-specific options. Obtain fields, enums and conditional requirements from /v1/model-capabilities (operations[].requestJsonSchema). A source file goes as its URL (image_url, audio_url, video_url, …), as inline base64 (image_base64, audio_base64, video_base64, …) or as a Files API id (image_file_id, audio_file_id, video_file_id, input_file_ids, …) from POST /v1/files."},"strict":{"type":"boolean","description":"Strict mode: refuse with 422 strict_validation_failed (and a violations list) a request that would not run exactly as written, before anything is quoted or charged. Also the header x-getvibe-strict: 1."},"quote_id":{"type":"string","maxLength":128,"description":"mq_… id returned by POST /api/media/price. The job runs only at that quoted price; a stale, used or moved quote is refused with 409/422."},"max_price_rub":{"oneOf":[{"type":"number","minimum":0},{"type":"string"}],"description":"Hard ceiling for this one job in the account currency. Refused before submit (422 media_max_price_exceeded) when the quote is higher; a metered job is never charged above it."},"webhook_url":{"type":"string","format":"uri","description":"Public https URL that receives a signed notification when the job finishes."}}},"MediaErrorResponse":{"type":"object","required":["ok","code","message"],"properties":{"ok":{"type":"boolean","enum":[false]},"code":{"type":"string","description":"Stable machine code, e.g. unknown_field, strict_validation_failed, media_max_price_exceeded, payload_too_large, voice_samples_limit."},"message":{"type":"string"},"field":{"type":"string","description":"unknown_field: the first unknown top-level field."},"fields":{"type":"array","items":{"type":"string"},"description":"unknown_field: every unknown top-level field."},"max_body_bytes":{"type":"integer","description":"payload_too_large: the largest body this endpoint accepts."}},"additionalProperties":true},"VoiceSample":{"type":"object","description":"Exactly one of audio_url or audio_base64. wav/mp3, at most 10 MB per sample.","properties":{"audio_url":{"type":"string","format":"uri","description":"Public https URL of the recording."},"audio_base64":{"type":"string","description":"The recording as base64 or a data: URI."}}},"VoiceCreateRequest":{"type":"object","required":["name","consent"],"description":"One recording (audio_url or audio_base64) or samples[] (2–25 recordings, engine elevenlabs only). Limits: 10 MB per sample, 50 MB and 300 seconds per voice in total. The request body may be at most 70 953 644 bytes (the 50 MB total as base64 plus JSON); a larger one answers 413 payload_too_large.","properties":{"name":{"type":"string"},"consent":{"type":"boolean","enum":[true],"description":"Confirms the voice is yours or you hold the speaker’s consent."},"engine":{"type":"string","enum":["standard","premium","elevenlabs"]},"audio_url":{"type":"string","format":"uri"},"audio_base64":{"type":"string"},"samples":{"type":"array","minItems":1,"maxItems":25,"items":{"$ref":"#/components/schemas/VoiceSample"}},"remove_background_noise":{"type":"boolean"}}},"VoiceSamplesAddRequest":{"type":"object","required":["samples"],"description":"Same limits as creation, counting what the voice already holds (25 recordings, 300 seconds). 20 additions per client per 24 hours.","properties":{"samples":{"type":"array","minItems":1,"maxItems":25,"items":{"$ref":"#/components/schemas/VoiceSample"}},"remove_background_noise":{"type":"boolean"}}},"Voice":{"type":"object","properties":{"id":{"type":"string","pattern":"^voice_[A-Za-z0-9]{20}$"},"name":{"type":"string"},"engine":{"type":"string","enum":["standard","premium","elevenlabs"]},"created_at":{"type":"string","format":"date-time"},"sample_seconds":{"type":"number","nullable":true},"last_used_at":{"type":"string","format":"date-time","nullable":true},"monthly_fee":{"type":"object","nullable":true,"properties":{"amount":{"type":"number"},"currency":{"type":"string","enum":["RUB","USD"]}}},"next_charge_at":{"type":"string","format":"date-time","nullable":true},"status":{"type":"string","enum":["active","unpaid"]},"deletion_at":{"type":"string","format":"date-time","nullable":true}}},"AudioSpeechRequest":{"type":"object","required":["model","input"],"properties":{"model":{"type":"string","minLength":1,"description":"A public TTS model from /v1/models or /v1/model-capabilities."},"input":{"type":"string","minLength":1,"maxLength":10000,"description":"Text to synthesize."},"voice":{"type":"string","description":"Model-specific voice or language selection; default is used when omitted."},"response_format":{"type":"string","enum":["mp3","opus","aac","flac","wav","pcm"],"description":"Requested output format. Native provider output is returned; unsupported conversions fail closed."},"speed":{"type":"number","minimum":0.25,"maximum":4,"description":"Speech speed where supported by the selected model."}}},"AudioTranscriptionRequest":{"type":"object","required":["file","model"],"properties":{"file":{"type":"string","format":"binary","description":"Audio file, up to 50 MB."},"model":{"type":"string","minLength":1,"description":"A public STT model from /v1/models or /v1/model-capabilities."},"language":{"type":"string","minLength":2,"maxLength":10,"description":"Optional language code, for example ru or en."}}},"ImageGenerationRequest":{"type":"object","required":["model","prompt"],"properties":{"model":{"type":"string","minLength":1,"description":"A public image model from /api/media-catalog. The bare id, a vendor-prefixed id (google/gemini-3.1-flash-image) and a pinned variant (gpt-image-2:network) all address the same model."},"prompt":{"type":"string","minLength":1},"n":{"type":"integer","enum":[1],"description":"Only 1: each generation is a separate job with its own price."},"size":{"type":"string","description":"OpenAI size, honoured as its aspect ratio (1024x1024, 1792x1024, 1024x1792, 1536x1024, 1024x1536, auto, or any WxH that reduces to a ratio the model offers)."},"quality":{"type":"string","description":"Forwarded only to models with a priced quality axis; auto omits it. A value the model does not offer is refused, never dropped."},"response_format":{"type":"string","enum":["url","b64_json"],"default":"url"},"user":{"type":"string","description":"Accepted and ignored."}}},"ImageGenerationResponse":{"type":"object","required":["created","data"],"properties":{"created":{"type":"integer"},"data":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"b64_json":{"type":"string"}}}}}},"ImageGenerationListResponse":{"type":"object","required":["object","data"],"properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","required":["id","model","status","created","cost_rub","data"],"properties":{"id":{"type":"string"},"model":{"type":"string"},"status":{"type":"string","enum":["succeeded","failed","in_progress"]},"created":{"type":"integer"},"cost_rub":{"type":"number"},"data":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"}}}}}}}}},"AudioTranscriptionResponse":{"type":"object","required":["text"],"properties":{"text":{"type":"string"}}},"MediaGenerateResponse":{"type":"object","required":["ok","jobId","status","model","provider","priceRub","requestedModel","effectiveModel","addressAs","providerAlias"],"properties":{"ok":{"type":"boolean"},"jobId":{"type":"string"},"status":{"type":"string","enum":["processing"],"description":"Initial accepted response. A submission whose start confirmation is uncertain may later be reported by GET jobs as submitting."},"model":{"type":"string"},"provider":{"type":"string","enum":["pixel","flow","canvas","prime"]},"priceRub":{"type":"number"},"requestedModel":{"type":"string"},"effectiveModel":{"type":"string"},"addressAs":{"type":"string"},"providerAlias":{"type":"string","enum":["pixel","flow","canvas","prime"]}}},"MediaJobResponse":{"type":"object","properties":{"status":{"type":"string","enum":["submitting","processing","success","fail"]},"model":{"type":"string"},"provider":{"type":"string","enum":["pixel","flow","canvas","prime"]},"requestedModel":{"type":"string"},"effectiveModel":{"type":"string"},"addressAs":{"type":"string"},"providerAlias":{"type":"string","enum":["pixel","flow","canvas","prime"]},"resultUrls":{"type":"array","items":{"type":"string"}},"resultsExpireAt":{"type":"string","format":"date-time","nullable":true,"description":"Result files are kept for 7 days after the job completes; after this instant resultUrls answer 410 Gone."},"resultText":{"type":"string","nullable":true},"resultMeta":{"type":"object","nullable":true,"additionalProperties":true},"priceRub":{"type":"number"},"failMsg":{"type":"string","nullable":true},"errorCode":{"type":"string","nullable":true},"retryGuidance":{"type":"string","nullable":true,"description":"Safe guidance for media_submission_uncertain: poll the same jobId later; do not submit a duplicate."}}},"MediaCatalogResponse":{"type":"object","required":["pricesArePlaceholder","pricesAreEstimate","videoDisabled","models"],"properties":{"pricesArePlaceholder":{"type":"boolean"},"pricesAreEstimate":{"type":"boolean"},"videoDisabled":{"type":"boolean"},"models":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"model":{"type":"string"},"kind":{"type":"string","enum":["image","video","audio","music","3d"]},"task":{"type":"string","enum":["tts","asr","sfx","voice-changer","dubbing","utility"],"description":"Present on every kind=audio model, absent on all others: tts = text in, speech out; asr = speech in, text out; sfx = sound effects; voice-changer = speech re-voiced in another voice; dubbing = speech translated and re-voiced; utility = stems, isolation, alignment, lyrics and other audio tools. kind=music models carry no task."}}}}}},"MediaPriceRequest":{"type":"object","required":["model"],"additionalProperties":false,"description":"Accepts the same body as POST /api/media/generate, so one body can be quoted and then submitted; webhook_url, quote_id and max_price_rub are accepted and not used by the quote. Any other top-level field is refused with 400 unknown_field.","properties":{"model":{"type":"string","minLength":1},"prompt":{"type":"string","description":"Per-character lanes (TTS, voice clone) are priced on its length."},"opts":{"type":"object","additionalProperties":true,"description":"Exact option values whose price should be quoted. Per-second routes whose length follows an uploaded track (kling-ai-avatar, omnihuman, motion control, upscale, lip-sync) are priced on the length measured from that file (URL, base64 or *_file_id)."},"strict":{"type":"boolean"},"webhook_url":{"type":"string"},"quote_id":{"type":"string"},"max_price_rub":{"oneOf":[{"type":"number"},{"type":"string"}]}}},"MediaPriceResponse":{"type":"object","required":["ok","priceRub","isEstimate"],"properties":{"ok":{"type":"boolean","enum":[true]},"priceRub":{"type":"number"},"isEstimate":{"type":"boolean"},"estimateReason":{"type":"string","description":"For an estimate: what the final charge is computed from, and for source-length routes whether the input length was measured or a default was assumed."},"breakdown":{"type":"object","additionalProperties":{"type":"number"}},"audioSeconds":{"type":"number","description":"Speech-to-text / Voice Changer: measured input length."},"outputSeconds":{"type":"number","description":"Lip-sync: output length derived from both measured inputs."},"sourceSeconds":{"type":"number","description":"Avatar / OmniHuman / upscale: measured length of the input track the price covers."},"quoteId":{"type":"string","description":"Pass as quote_id to POST /api/media/generate to run at exactly this price."},"expiresAt":{"type":"string","format":"date-time"},"quoteTtlSeconds":{"type":"integer"},"effectiveOpts":{"type":"object","additionalProperties":true,"description":"Strict quotes only: the options the job would run with."}},"additionalProperties":true},"ModelCapabilitiesResponse":{"type":"object","description":"Model discovery payload. Every media operation includes requestJsonSchema (JSON Schema draft 2020-12 for the exact generate body), plus compatibility annotations requestSchema and conditionalRequirements, providerVariants, availability and price-status metadata.","properties":{"models":{"type":"array","items":{"type":"object"}},"pagination":{"type":"object","properties":{"page":{"type":"integer","minimum":1},"pageSize":{"type":"integer","minimum":1,"maximum":100},"total":{"type":"integer","minimum":0},"totalPages":{"type":"integer","minimum":0}}},"stores_data_in_russia":{"type":"boolean","nullable":true},"supported_parameters":{"type":"object","description":"Endpoint/operation-scoped parameter support. Values are supported or unconfirmed."}},"additionalProperties":true},"V1DecisionRequest":{"type":"object","required":["state","questions"],"additionalProperties":false,"properties":{"model":{"type":"string","description":"Decisions model id: typesafe/jev-1.13 (the default when omitted) or typesafe/jev-1.14.","example":"typesafe/jev-1.14"},"state":{"description":"The context the decision is evaluated against: a string, an object, or an array.","oneOf":[{"type":"string"},{"type":"object","additionalProperties":true},{"type":"array","items":{}}]},"questions":{"type":"object","minProperties":1,"maxProperties":20,"additionalProperties":{"$ref":"#/components/schemas/DecisionQuestion"}},"assets":{"type":"object","description":"typesafe/jev-1.14 with the TypeSafe-Danger-Zone-Images: true header only. Images keyed by a reference string that appears in state, instructions or criteria.","additionalProperties":{"type":"object","required":["format","data_base64"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["image"]},"format":{"type":"string","enum":["png","jpg","jpeg"]},"data_base64":{"type":"string"}}}}}},"DecisionQuestion":{"type":"object","required":["type","instructions"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["choice","score","noul","box"],"description":"box: typesafe/jev-1.14 with the TypeSafe-Danger-Zone-Images: true header only."},"instructions":{"type":"string"},"criteria":{"description":"choice: an object mapping each option to its description. score: an ordered array of level labels. noul and box: omitted.","oneOf":[{"type":"object","additionalProperties":{"type":"string"}},{"type":"array","items":{"type":"string"}}]}}},"DecisionResponse":{"type":"object","properties":{"object":{"type":"string","enum":["decisions"]},"model":{"type":"string","example":"typesafe/jev-1.13"},"answers":{"type":"object","description":"One entry per question name; the shape depends on the question type.","additionalProperties":{"type":"object","additionalProperties":true}},"usage":{"type":"object","properties":{"input_tokens":{"type":"integer"},"output_tokens":{"type":"integer"}}}}},"BalanceResponse":{"type":"object","properties":{"balance_rub":{"type":"number"},"currency":{"type":"string","example":"RUB"}}},"GenerationsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"model":{"type":"string"},"promptTokens":{"type":"integer"},"completionTokens":{"type":"integer"},"priceRub":{"type":"number"},"createdAt":{"type":"string","format":"date-time"}}}},"page":{"type":"integer"},"limit":{"type":"integer"},"total":{"type":"integer"}}},"TicketCreateRequest":{"type":"object","required":["subject","message"],"additionalProperties":false,"properties":{"subject":{"type":"string","minLength":3,"maxLength":200},"message":{"type":"string","minLength":10,"maxLength":8000},"category":{"type":"string","default":"general","enum":["api_error","performance","incorrect_response","integration","feature_request","other","billing","account","general"]},"requestIds":{"type":"array","maxItems":10,"uniqueItems":true,"description":"Request IDs from your own account; optional.","items":{"type":"string","minLength":1,"maxLength":128}},"clientIncidentId":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{0,99}$","description":"Your stable series ID; an open ticket with the same ID is reused."}}},"Ticket":{"type":"object","required":["id","object","subject","category","source","status","requestIds","occurrences","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"object":{"type":"string","enum":["ticket"]},"subject":{"type":"string"},"category":{"type":"string"},"source":{"type":"string","enum":["api","dashboard","technical-feedback"]},"status":{"type":"string","enum":["open","replied","closed"]},"requestIds":{"type":"array","items":{"type":"string"}},"clientIncidentId":{"type":"string","nullable":true},"occurrences":{"type":"integer","minimum":1},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"repliedAt":{"type":"string","format":"date-time","nullable":true}}},"TicketMessage":{"type":"object","required":["id","author","body","createdAt","attachments"],"properties":{"id":{"type":"string"},"author":{"type":"string","enum":["client","staff"]},"body":{"type":"string","description":"Plain text. Render it as text, never as HTML."},"createdAt":{"type":"string","format":"date-time"},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"filename":{"type":"string"},"mimeType":{"type":"string"},"byteSize":{"type":"integer"}}}}}},"TicketThread":{"allOf":[{"$ref":"#/components/schemas/Ticket"},{"type":"object","properties":{"messages":{"type":"array","items":{"$ref":"#/components/schemas/TicketMessage"}}}}]},"TicketCreateResponse":{"type":"object","required":["deduplicated","ticket"],"properties":{"deduplicated":{"type":"boolean"},"ticket":{"$ref":"#/components/schemas/Ticket"}}},"TicketList":{"type":"object","required":["object","data","hasMore","nextCursor"],"properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Ticket"}},"hasMore":{"type":"boolean"},"nextCursor":{"type":"string","nullable":true}}},"TicketError":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","example":"invalid_fields"}}},"TechnicalFeedbackRequest":{"type":"object","required":["category","summary","details"],"additionalProperties":false,"properties":{"category":{"type":"string","enum":["api_error","performance","incorrect_response","integration","feature_request","other"]},"summary":{"type":"string","minLength":3,"maxLength":200},"details":{"type":"string","minLength":10,"maxLength":4000},"requestIds":{"type":"array","maxItems":10,"uniqueItems":true,"description":"Request IDs for this client; optional.","items":{"type":"string","minLength":1,"maxLength":128}},"clientIncidentId":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{0,99}$","description":"Stable client-side incident ID for deduplication."}}},"TechnicalFeedbackIncident":{"type":"object","required":["id","category","summary","requestIds","status","occurrences","lastSeenAt","createdAt"],"properties":{"id":{"type":"string"},"category":{"type":"string","enum":["api_error","performance","incorrect_response","integration","feature_request","other"]},"summary":{"type":"string"},"requestIds":{"type":"array","items":{"type":"string"}},"clientIncidentId":{"type":"string","nullable":true},"status":{"type":"string","example":"manual_review"},"occurrences":{"type":"integer","minimum":1},"lastSeenAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"}}},"TechnicalFeedbackCreateResponse":{"type":"object","required":["deduplicated","incident"],"properties":{"deduplicated":{"type":"boolean"},"incident":{"$ref":"#/components/schemas/TechnicalFeedbackIncident"}}},"TechnicalFeedbackGetResponse":{"type":"object","required":["incident"],"properties":{"incident":{"$ref":"#/components/schemas/TechnicalFeedbackIncident"}}},"ErrorResponse":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string"},"code":{"type":"integer"}}}}},"GenerationRecord":{"type":"object","properties":{"id":{"type":"string"},"model":{"type":"string"},"mediaType":{"type":"string","enum":["TEXT","IMAGE","VIDEO","AUDIO","MUSIC","MODEL_3D"]},"promptTokens":{"type":"integer"},"completionTokens":{"type":"integer"},"units":{"type":"integer","nullable":true},"priceRub":{"type":"number"},"createdAt":{"type":"string","format":"date-time"},"api_key_id":{"type":"string","nullable":true},"api_key_prefix":{"type":"string","nullable":true,"example":"sk-pv-d7afff"},"api_key_label":{"type":"string","nullable":true}}},"PricingResponse":{"type":"object","required":["object","currency","data"],"properties":{"object":{"type":"string","example":"list"},"currency":{"type":"string","enum":["RUB","USD"],"description":"Currency of every price in this response. USD here, although the field names end in Rub."},"data":{"type":"array","description":"Text, embedding and decision models with their per-variant prices, per 1M tokens.","items":{"type":"object","required":["model","variants"],"properties":{"model":{"type":"string"},"variants":{"type":"array","items":{"type":"object","required":["addressAs","inputRub","outputRub","cacheReadRub","cacheable","isDefault","providerAlias","pinAs"],"properties":{"addressAs":{"type":"string","description":"Exact value for the model field in the request"},"inputRub":{"type":"number","description":"Input price per 1M tokens. Image inputs are billed here too, as the input tokens the model counts for them."},"outputRub":{"type":"number","description":"Output price per 1M tokens. Reasoning tokens are billed as output (caps.reasoning.billedAsOutput in /api/catalog). 0 for embeddings and decisions."},"cacheable":{"type":"boolean","description":"The variant bills cache reads at cacheReadRub."},"cacheReadRub":{"type":"number","nullable":true,"description":"Cached-input price per 1M tokens; null when cacheable is false."},"cacheWriteRub":{"type":"number","nullable":true,"description":"Cache-write price per 1M tokens where the route bills writes separately; null otherwise. Absent on embedding and decision rows."},"isDefault":{"type":"boolean","description":"The variant a bare model id is routed to."},"providerAlias":{"type":"string","nullable":true,"description":"Public alias of pinAs; null when the variant has no pin (embeddings, decisions)."},"pinAs":{"type":"string","description":"Strict-pin address of this variant (model:alias). Equals addressAs on every non-default variant."},"contextTiers":{"type":"array","items":{"type":"object","additionalProperties":true},"description":"Present when the price depends on prompt length: the price per tier."},"cumulative":{"type":"boolean","enum":[true],"description":"Present (true) when contextTiers price the whole prompt at the tier it reaches."},"peakMult":{"type":"number","description":"Present on routes with a peak-hours multiplier."},"peakInputRub":{"type":"number","description":"Input price per 1M during peak hours."},"peakOutputRub":{"type":"number","description":"Output price per 1M during peak hours."},"peakCachedInputRub":{"type":"number","description":"Cached-input price per 1M during peak hours."},"peakWindows":{"type":"array","items":{"type":"object","properties":{"start":{"type":"string"},"end":{"type":"string"},"days":{"type":"array","items":{"type":"integer"}}}},"description":"Peak windows in peakTimezone, half-open [start, end). The price is decided by the request start time."},"peakTimezone":{"type":"string","description":"Time zone of the peak windows (Europe/Moscow)."},"priceTier":{"type":"string","description":"Present on models priced by supplier capacity: the current tier (normal or surge). inputRub/outputRub are the current price."},"surge":{"type":"boolean","description":"true — high demand: the price is temporarily raised."},"surgeMult":{"type":"number","description":"Multiplier of the raised price."},"surgeInputRub":{"type":"number","description":"Input price per 1M under high demand (present while the price is normal)."},"surgeOutputRub":{"type":"number","description":"Output price per 1M under high demand (present while the price is normal)."},"normalInputRub":{"type":"number","description":"Normal input price per 1M (present while the raised price applies)."},"normalOutputRub":{"type":"number","description":"Normal output price per 1M (present while the raised price applies)."},"normalCachedInputRub":{"type":"number","description":"Normal cached-input price per 1M (present while the raised price applies)."},"priceNote":{"type":"string","description":"One-sentence explanation of the price for the client."},"minChargePerRequest":{"type":"number","description":"Present only on routes with a supplier per-request minimum: the least one successful request is billed, per REQUEST (not per 1M)."},"minChargeCurrency":{"type":"string","enum":["RUB","USD"],"description":"Present together with minChargePerRequest."},"minChargeNote":{"type":"string","description":"The same fact as one client-facing sentence."}}}},"channels":{"type":"array","items":{"$ref":"#/components/schemas/UsPricedChannel"}},"pricing":{"$ref":"#/components/schemas/UsModelPricing"}}}}}},"CountTokensResponse":{"type":"object","properties":{"input_tokens":{"type":"integer","description":"Estimated input tokens (~4 characters per token)"}}},"ImagesEditRequest":{"type":"object","required":["model","prompt","image"],"properties":{"model":{"type":"string","example":"gpt-image-2"},"prompt":{"type":"string","description":"Editing instructions"},"image":{"type":"string","description":"Source image URL (not multipart)"},"n":{"type":"integer","default":1},"size":{"type":"string","example":"1024x1024"}}},"VideoGenerationsRequest":{"type":"object","required":["model","prompt"],"properties":{"model":{"type":"string","example":"klingai/kling-v3.0-t2v"},"prompt":{"type":"string","description":"Text description of the scene"},"n":{"type":"integer","default":1,"description":"Number of videos"},"duration":{"type":"integer","description":"Duration in seconds (5 or 10 for Kling). One unit equals 5 seconds."}}},"VideoGenerationsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","description":"Generated video URL (public upstream)"},"duration":{"type":"integer","nullable":true},"revised_prompt":{"type":"string","nullable":true}}}},"usage":{"$ref":"#/components/schemas/Usage"}}},"CatalogResponse":{"type":"array","description":"Public catalog of text models","items":{"type":"object","properties":{"model":{"type":"string"},"apiModel":{"type":"string"},"variants":{"type":"array","items":{"type":"object"}},"stores_data_in_russia":{"type":"boolean","nullable":true,"description":"Conservative aggregation across public provider variants; null when any route is unknown or routes disagree."},"byRequest":{"type":"boolean"},"blurb":{"type":"string"},"officialInputUsd":{"type":"number","nullable":true,"description":"Vendor's official list price per 1M input tokens, in USD. The same reference the /models savings column uses; null when no vendor reference is held (never 0)."},"officialOutputUsd":{"type":"number","nullable":true,"description":"Vendor's official list price per 1M output tokens, in USD. The same reference the /models savings column uses; null when no vendor reference is held (never 0)."},"officialCacheReadUsd":{"type":"number","nullable":true,"description":"Vendor's official cache-read price per 1M cached input tokens, in USD, when the vendor publishes one; null when the reference has no cache-read price or no vendor reference is held."},"channels":{"type":"array","items":{"$ref":"#/components/schemas/UsPricedChannel"}},"pricing":{"$ref":"#/components/schemas/UsModelPricing"}}}},"SupplierError":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}},"SupplierConnectionEarnings":{"type":"object","required":["earnedMicros","requestCount"],"properties":{"earnedMicros":{"type":"string","description":"Payable micro-USD as an exact decimal string; \"0\" when nothing has accrued."},"requestCount":{"type":"integer"}}},"SupplierConnection":{"type":"object","properties":{"id":{"type":"string"},"connectionType":{"type":"string"},"subscriptionProductLabel":{"type":"string","nullable":true},"verifiedEndpoint":{"type":"string","nullable":true},"status":{"type":"string"},"enabled":{"type":"boolean"},"verificationState":{"type":"string"},"verifiedBy":{"type":"string","nullable":true},"label":{"type":"string","nullable":true},"account":{"type":"string","nullable":true},"verifiedModels":{"type":"array","items":{"type":"string"}},"servingModels":{"type":"array","items":{"type":"string"}},"lastVerifiedAt":{"type":"string","format":"date-time","nullable":true},"proxy":{"type":"string","nullable":true,"description":"Redacted proxy label; never the secret."},"proxySource":{"type":"string","nullable":true,"description":"\"own\", \"pool\" or null on a pre-mandate row."},"proxyCountry":{"type":"string","nullable":true},"proxyExpiresAt":{"type":"string","format":"date-time","nullable":true},"proxyExpiryDays":{"type":"integer","nullable":true},"proxyLost":{"type":"boolean"},"probedVia":{"type":"string","nullable":true},"lastError":{"type":"string","nullable":true},"needsReauth":{"type":"boolean"},"accountLimits":{"type":"object","nullable":true,"additionalProperties":true},"accountLimitsSource":{"type":"string","nullable":true},"accountLimitsCheckedAt":{"type":"string","format":"date-time","nullable":true},"earnings":{"$ref":"#/components/schemas/SupplierConnectionEarnings"},"createdAt":{"type":"string","format":"date-time"}}},"SupplierConnectionsResponse":{"type":"object","required":["connections"],"properties":{"connections":{"type":"array","items":{"$ref":"#/components/schemas/SupplierConnection"}}}},"SupplierOffer":{"type":"object","properties":{"id":{"type":"string"},"baseModel":{"type":"string"},"claimedModel":{"type":"string"},"providerLabel":{"type":"string","nullable":true},"status":{"type":"string"},"statusReason":{"type":"string","nullable":true},"inputMicrosPer1M":{"type":"string"},"outputMicrosPer1M":{"type":"string"},"cacheReadMicrosPer1M":{"type":"string","nullable":true},"blendedPctOfOfficial":{"type":"string","nullable":true},"officialPrice":{"type":"object","nullable":true,"additionalProperties":true,"description":"The vendor’s own card for the model, when we hold one."},"pctOfOfficial":{"type":"number","nullable":true},"trafficTier":{"type":"string","nullable":true},"cooldownUntil":{"type":"string","format":"date-time","nullable":true},"cooldownReason":{"type":"string","nullable":true},"firstVerifiedAt":{"type":"string","format":"date-time","nullable":true},"activatedAt":{"type":"string","format":"date-time","nullable":true},"lastManualPriceChangeAt":{"type":"string","format":"date-time","nullable":true},"maxConcurrentRequests":{"type":"integer","nullable":true},"maxPinnedSessions":{"type":"integer","nullable":true,"description":"Distinct sessions that may be pinned to the account at once (a different limit from concurrency)."},"servingEnabled":{"type":"boolean"}}},"SupplierOffersResponse":{"type":"object","required":["offers"],"properties":{"offers":{"type":"array","items":{"$ref":"#/components/schemas/SupplierOffer"}}}},"SupplierPriceSchedule":{"type":"object","properties":{"id":{"type":"string"},"offerId":{"type":"string"},"priceInUsd":{"type":"string"},"priceOutUsd":{"type":"string"},"effectiveFrom":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"cancelledAt":{"type":"string","format":"date-time","nullable":true},"appliedAt":{"type":"string","format":"date-time","nullable":true}}},"SupplierPriceChangesResponse":{"type":"object","required":["offerId","schedules"],"properties":{"offerId":{"type":"string"},"schedules":{"type":"array","items":{"$ref":"#/components/schemas/SupplierPriceSchedule"}}}},"SupplierStatsTotals":{"type":"object","properties":{"requests":{"type":"integer"},"successes":{"type":"integer"},"errors":{"type":"integer"},"timeouts":{"type":"integer"},"successRatePct":{"type":"number","nullable":true},"promptTokens":{"type":"integer"},"completionTokens":{"type":"integer"},"cacheTokens":{"type":"integer"},"sourceCostMicros":{"type":"integer"},"avgLatencyMs":{"type":"number","nullable":true},"p50LatencyMs":{"type":"number","nullable":true},"p95LatencyMs":{"type":"number","nullable":true}}},"SupplierStatsDailyPoint":{"type":"object","properties":{"date":{"type":"string","description":"UTC calendar day, YYYY-MM-DD."},"requests":{"type":"integer"},"successes":{"type":"integer"},"errors":{"type":"integer"},"promptTokens":{"type":"integer"},"completionTokens":{"type":"integer"},"sourceCostMicros":{"type":"integer"}}},"SupplierStatsByOffer":{"type":"object","properties":{"offerId":{"type":"string"},"baseModel":{"type":"string"},"requests":{"type":"integer"},"successRatePct":{"type":"number","nullable":true},"promptTokens":{"type":"integer"},"completionTokens":{"type":"integer"},"tokens":{"type":"integer"},"sourceCostMicros":{"type":"integer"},"hitRate":{"type":"number","nullable":true},"effTotal":{"type":"number","nullable":true},"rank":{"type":"integer","nullable":true}}},"SupplierStatsResponse":{"type":"object","required":["totals","daily","byOffer"],"properties":{"totals":{"$ref":"#/components/schemas/SupplierStatsTotals"},"daily":{"type":"array","items":{"$ref":"#/components/schemas/SupplierStatsDailyPoint"}},"byOffer":{"type":"array","items":{"$ref":"#/components/schemas/SupplierStatsByOffer"}}}},"SupplierEarningEvent":{"type":"object","properties":{"id":{"type":"string"},"baseModel":{"type":"string"},"result":{"type":"string"},"promptTokens":{"type":"string"},"completionTokens":{"type":"string"},"paidMicros":{"type":"string","description":"Payable micro-USD as an exact decimal string."},"settlementEligible":{"type":"boolean"},"finishedAt":{"type":"string","format":"date-time"},"settlementStatus":{"type":"string","enum":["pending_or_settled","not_eligible"]}}},"SupplierEarningsResponse":{"type":"object","required":["events"],"properties":{"events":{"type":"array","items":{"$ref":"#/components/schemas/SupplierEarningEvent"}}}},"SupplierProxy":{"type":"object","required":["scheme","host","port"],"properties":{"scheme":{"type":"string","description":"Proxy scheme, e.g. http or socks5."},"host":{"type":"string"},"port":{"type":"integer","minimum":1,"maximum":65535},"username":{"type":"string"},"password":{"type":"string"}}},"SupplierProxyCheckRequest":{"type":"object","description":"Exactly one of proxy / proxyCountry.","properties":{"proxy":{"$ref":"#/components/schemas/SupplierProxy"},"proxyCountry":{"type":"string","pattern":"^[a-zA-Z]{2}$"}}},"SupplierProxyCheckResponse":{"type":"object","required":["ok","outcome"],"properties":{"ok":{"type":"boolean"},"outcome":{"type":"string","enum":["ok","proxy_failed","proxy_unavailable"]},"latencyMs":{"type":"integer"},"error":{"type":"string"}}},"SupplierOfferInput":{"type":"object","required":["baseModel","inputMicrosPer1M","outputMicrosPer1M"],"properties":{"baseModel":{"type":"string"},"inputMicrosPer1M":{"type":"integer","minimum":1},"outputMicrosPer1M":{"type":"integer","minimum":1}}},"SupplierBatchItem":{"type":"object","properties":{"externalId":{"type":"string","maxLength":200,"description":"Caller correlation id, echoed on the per-item result. Never interpreted."},"provider":{"type":"string","maxLength":100,"description":"The supply provider the supplier picked. Canonical field; connectionType/subscriptionProduct are accepted for compatibility."},"connectionType":{"type":"string"},"subscriptionProduct":{"type":"string"},"apiKey":{"type":"string","description":"A ready subscription credential. Encrypted before writing; never returned or logged."},"bindToken":{"type":"string","description":"The bind token minted by the browser start route (OAuth flow)."},"oauthCode":{"type":"string","description":"The code#state the supplier pasted after approving (OAuth flow)."},"codexAuthJson":{"type":"string","description":"A verbatim ~/.codex/auth.json bundle for a Codex provider."},"accessToken":{"type":"string","description":"Claude Code access token (sk-ant-oat01-…)."},"refreshToken":{"type":"string","description":"Claude Code or Antigravity refresh token."},"connectionLabel":{"type":"string","maxLength":100},"proxy":{"$ref":"#/components/schemas/SupplierProxy"},"proxyCountry":{"type":"string","pattern":"^[a-zA-Z]{2}$","description":"A 2-letter country code to prefer for our pool proxy. Optional: with no proxy and no country the server assigns and proves one."},"offers":{"type":"array","items":{"$ref":"#/components/schemas/SupplierOfferInput"},"maxItems":20,"description":"Optional. A verified connection auto-populates the models the vendor confirmed."}}},"SupplierConnectionsCreateRequest":{"description":"One connection item, the { \"items\": [...] } envelope, or a bare array of items.","oneOf":[{"$ref":"#/components/schemas/SupplierBatchItem"},{"$ref":"#/components/schemas/SupplierBatchRequest"},{"type":"array","items":{"$ref":"#/components/schemas/SupplierBatchItem"},"minItems":1,"maxItems":25}]},"SupplierBatchRequest":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/SupplierBatchItem"},"minItems":1,"maxItems":25}}},"SupplierBatchItemResult":{"type":"object","required":["index","externalId","ok"],"properties":{"index":{"type":"integer"},"externalId":{"type":"string","nullable":true},"ok":{"type":"boolean"},"connectionId":{"type":"string","description":"Present only when ok is true."},"connectionType":{"type":"string"},"verificationState":{"type":"string","enum":["verified","unverified"]},"verifiedModels":{"type":"array","items":{"type":"string"}},"subscriptionProductLabel":{"type":"string","nullable":true,"description":"Human product name of the connected account."},"verifiedEndpoint":{"type":"string","nullable":true},"latencyMs":{"type":"integer"},"code":{"type":"string","description":"Machine-readable refusal code when ok is false."},"error":{"type":"string","description":"Human-readable refusal reason; never a credential, token or OAuth code."},"models":{"type":"array","items":{"type":"string"},"description":"The models the vendor did not confirm, for model_not_served."}}},"SupplierBatchResponse":{"type":"object","required":["supplierId","accepted","rejected","results"],"properties":{"supplierId":{"type":"string"},"accepted":{"type":"integer"},"rejected":{"type":"integer"},"results":{"type":"array","items":{"$ref":"#/components/schemas/SupplierBatchItemResult"}}}},"SupplierApiKeySummary":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string","nullable":true},"keyPrefix":{"type":"string","description":"Display prefix only; the token and its hash are never returned."},"active":{"type":"boolean"},"lastUsedAt":{"type":"string","format":"date-time","nullable":true},"revokedAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"}}},"SupplierApiKeysResponse":{"type":"object","required":["keys"],"properties":{"keys":{"type":"array","items":{"$ref":"#/components/schemas/SupplierApiKeySummary"}}}},"SupplierApiKeyCreateRequest":{"type":"object","properties":{"label":{"type":"string","maxLength":100}}},"SupplierApiKeyCreatedResponse":{"type":"object","required":["key","apiKey"],"properties":{"key":{"type":"string","description":"The full sk-sup-… token, shown here and nowhere else, ever again."},"apiKey":{"$ref":"#/components/schemas/SupplierApiKeySummary"}}},"SupplierApiKeyRevokedResponse":{"type":"object","required":["ok","id"],"properties":{"ok":{"type":"boolean","enum":[true]},"id":{"type":"string"}}},"UsPricePoint":{"type":"object","description":"USD per 1M tokens.","properties":{"input":{"type":"number"},"output":{"type":"number","nullable":true,"description":"null when the book did not pair the two legs."}}},"UsFillWindow":{"type":"object","nullable":true,"description":"Where this channel's paid requests actually filled on its ladder over the window, from our own billing. Each request's billed rate is placed on the nearest CURRENT rung; a rate more than 10 % outside today's ladder is counted in belowLadder / aboveLadder (books move), and a request charged the per-request minimum in minimumCharge. null below 20 requests.","properties":{"windowHours":{"type":"integer","enum":[24,168]},"requests":{"type":"integer"},"avgPrice":{"allOf":[{"$ref":"#/components/schemas/UsPricePoint"}],"description":"Volume-weighted average paid, USD per 1M tokens (cache reads/writes at the published coefficients, minimum charges included): the typical price you will actually pay."},"rungs":{"type":"array","description":"One entry per current rung that received any fill, cheapest first; input/output match the ladder rung.","items":{"type":"object","properties":{"input":{"type":"number"},"output":{"type":"number","nullable":true},"requests":{"type":"number"},"tokens":{"type":"number"}}}},"belowLadder":{"type":"object","description":"Fractions of 1: the share of the window's paid requests, and of their tokens.","properties":{"requests":{"type":"number"},"tokens":{"type":"number"}}},"aboveLadder":{"type":"object","description":"Fractions of 1: the share of the window's paid requests, and of their tokens.","properties":{"requests":{"type":"number"},"tokens":{"type":"number"}}},"minimumCharge":{"type":"object","description":"Fractions of 1: the share of the window's paid requests, and of their tokens.","properties":{"requests":{"type":"number"},"tokens":{"type":"number"}}}}},"UsHourlyPrice":{"type":"object","nullable":true,"description":"The average price actually paid in each hour of the day (UTC), at the same arithmetic as avgPrice, from our own billing. Two series are published: over the last 7 days (byHour — seven samples of each clock hour) and over the last 24 hours (byHour24h — one sample per hour). An hour under 10 paid requests is omitted. In the reader's local time on the ladder page.","properties":{"windowHours":{"type":"integer","enum":[24,168]},"hours":{"type":"array","items":{"type":"object","properties":{"hourUtc":{"type":"integer","minimum":0,"maximum":23},"requests":{"type":"integer"},"input":{"type":"number","description":"USD per 1M input tokens, volume-weighted."},"output":{"type":"number"}}}}}},"UsPoolFill":{"type":"object","description":"The fill distribution over the last 24 hours and the last 7 days, plus the price by hour of day for each window.","properties":{"24h":{"$ref":"#/components/schemas/UsFillWindow"},"7d":{"$ref":"#/components/schemas/UsFillWindow"},"byHour":{"allOf":[{"$ref":"#/components/schemas/UsHourlyPrice"}],"description":"Price by hour of day over the last 7 days (windowHours 168)."},"byHour24h":{"allOf":[{"$ref":"#/components/schemas/UsHourlyPrice"}],"description":"Price by hour of day over the last 24 hours (windowHours 24)."}}},"UsModelPricing":{"type":"object","description":"How this model is billed. A \"fill\" channel is a marketplace book: the request fills at the cheapest offer that takes it and is billed that fill plus our commission, so the per-token rate lies between priceFrom and priceTo. A \"fixed\" channel bills its listed rate. Computed by the same code as /api/model-ladder, which carries the full rung list.","properties":{"basis":{"type":"string","enum":["fill","fixed","mixed"]},"unit":{"type":"string","enum":["USD per 1M tokens"]},"priceFrom":{"allOf":[{"$ref":"#/components/schemas/UsPricePoint"}],"nullable":true,"description":"Cheapest priceFrom across the channels — the lowest rate a request can be billed."},"priceTypical":{"allOf":[{"$ref":"#/components/schemas/UsPricePoint"}],"nullable":true,"description":"The default channel's offer-weighted median rung: where most supply sits. Not a forecast of the next fill."},"priceTo":{"allOf":[{"$ref":"#/components/schemas/UsPricePoint"}],"nullable":true,"description":"Dearest priceTo across the channels — the most a request without max_price can be billed."},"minChargePerRequest":{"type":"number","nullable":true,"example":0.00001429,"description":"The default channel's minChargePerRequest: the least one successful request is billed, USD per request. null when that channel has no minimum."},"ladder":{"type":"string","example":"/api/model-ladder?model=claude-opus-5.5","description":"Relative URL of this model's full price ladder."},"ladderUpdatedAt":{"type":"string","format":"date-time","nullable":true},"ladderStale":{"type":"boolean","description":"The ladder snapshot is older than one refresh cycle."}}},"UsPricedChannel":{"type":"object","description":"One channel (lane) a request for this model can be billed on, cheapest first.","properties":{"address":{"type":"string","nullable":true,"description":"The model value that pins this channel; null when it cannot be pinned."},"label":{"type":"string","nullable":true},"isDefault":{"type":"boolean","description":"The channel a bare model id tries first."},"inputUsd":{"type":"number","nullable":true,"description":"Legacy. On a fill channel this equals priceFrom.input — the floor, not a fixed price."},"outputUsd":{"type":"number","nullable":true,"description":"Legacy. On a fill channel this equals priceFrom.output."},"basis":{"type":"string","enum":["fill","fixed"]},"pool":{"type":"string","nullable":true,"description":"The book this channel buys from, as /api/model-ladder prints it (boardId). Each pool is published as exactly one channel."},"priceFrom":{"allOf":[{"$ref":"#/components/schemas/UsPricePoint"}],"nullable":true,"description":"Cheapest rung of the book. null when the ladder currently publishes no rungs for it."},"priceTypical":{"allOf":[{"$ref":"#/components/schemas/UsPricePoint"}],"nullable":true,"description":"Offer-weighted median rung."},"priceTo":{"allOf":[{"$ref":"#/components/schemas/UsPricePoint"}],"nullable":true,"description":"Dearest rung — the most a request without max_price can fill at."},"maxPriceCeiling":{"allOf":[{"$ref":"#/components/schemas/UsPricePoint"}],"nullable":true,"description":"With max_price set, the channel does not fill above min(max_price, maxPriceCeiling). Without max_price no ceiling is sent."},"fill":{"allOf":[{"$ref":"#/components/schemas/UsPoolFill"}],"nullable":true,"description":"Where this channel's requests actually filled: per-rung share of requests and tokens and the average price paid, over 24 h and 7 d. Send max_price to keep a request off the dearer rungs."},"minChargePerRequest":{"type":"number","example":0.00001429,"description":"Present only on a channel whose supplier charges a per-request minimum (supplier rule). The least one successful request is billed, in USD per REQUEST, not per 1M. A short or mostly cached request whose tokens would cost less is billed this amount."},"minChargeCurrency":{"type":"string","enum":["USD"],"description":"Present together with minChargePerRequest."},"minChargeNote":{"type":"string","description":"The same fact as one client-facing sentence."}}}}}}