{"openapi":"3.0.3","info":{"title":"Requesty API","description":"Requesty Inference API (router.requesty.ai) and Management API (api-v2.requesty.ai) in one file. Each path sets its own server.","version":"1.0.0"},"servers":[{"url":"https:\/\/router.requesty.ai","description":"Inference router endpoint"},{"url":"https:\/\/api-v2.requesty.ai","description":"Management API endpoint"}],"security":[{"BearerAuth":[]}],"paths":{"\/v1\/chat\/completions":{"servers":[{"url":"https:\/\/router.requesty.ai","description":"Inference router endpoint"}],"post":{"summary":"Create chat completion","description":"Create a chat completion using various AI models. Compatible with the OpenAI Chat Completions format.","requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ChatCompletionRequest"},"example":{"model":"openai\/gpt-4o-mini","messages":[{"role":"system","content":"You are a helpful assistant."},{"role":"user","content":"What is an LLM gateway?"}],"max_tokens":1024,"temperature":0.7}}}},"responses":{"200":{"description":"Chat completion response","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ChatCompletionResponse"},"example":{"id":"chatcmpl-abc123def456","object":"chat.completion","created":1748200000,"model":"openai\/gpt-4o-mini","choices":[{"index":0,"message":{"role":"assistant","content":"An LLM gateway is a unified API layer that routes requests to multiple large language model providers. It normalizes different API formats, handles failover, load balancing, and provides centralized monitoring and cost tracking across providers like OpenAI, Anthropic, Google, and others."},"finish_reason":"stop"}],"usage":{"prompt_tokens":24,"completion_tokens":52,"total_tokens":76,"cost":3.8e-5}}}}},"400":{"description":"Bad request - malformed payload or invalid parameters.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"401":{"description":"Unauthorized - missing or empty Authorization header.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"402":{"description":"Payment required - organization balance exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"403":{"description":"Forbidden - invalid token or model not in access list.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"404":{"description":"Not found - provider\/model not supported.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"413":{"description":"Payload too large - the request body exceeds the 50 MB limit. Send fewer or smaller images and files, or compact the conversation history.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Retry after the Retry-After header value.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"502":{"description":"Bad gateway - upstream provider returned an invalid response.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}}},"operationId":"createChatCompletion"}},"\/v1\/embeddings":{"servers":[{"url":"https:\/\/router.requesty.ai","description":"Inference router endpoint"}],"post":{"summary":"Create embedding","description":"Create vector embeddings for text input using embedding models.","requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/EmbeddingRequest"},"example":{"model":"openai\/text-embedding-3-small","input":"Requesty is a unified LLM gateway."}}}},"responses":{"200":{"description":"Embedding response","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/EmbeddingResponse"},"example":{"object":"list","data":[{"object":"embedding","index":0,"embedding":[0.0023,-0.0091,0.0153,-0.0028,0.0074]}],"model":"openai\/text-embedding-3-small","usage":{"prompt_tokens":8,"total_tokens":8}}}}},"400":{"description":"Bad request - malformed payload or invalid parameters.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"401":{"description":"Unauthorized - missing or empty Authorization header.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"402":{"description":"Payment required - organization balance exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"403":{"description":"Forbidden - invalid token or model not in access list.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"404":{"description":"Not found - provider\/model not supported.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"413":{"description":"Payload too large - the request body exceeds the 50 MB limit. Send fewer or smaller images and files, or compact the conversation history.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Retry after the Retry-After header value.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"502":{"description":"Bad gateway - upstream provider returned an invalid response.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}}},"operationId":"createEmbedding"}},"\/v1\/decisions":{"servers":[{"url":"https:\/\/router.requesty.ai","description":"Inference router endpoint"}],"post":{"summary":"Create decision","description":"Ask typed questions about a piece of content and get a calibrated answer for each one. Images go inside `state`.","requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/DecisionRequest"},"example":{"model":"openai\/gpt-6-luna","state":"The dragon heist in this fantasy novel had me hooked, but the ending dragged a little.","questions":{"positive":{"type":"noul","instructions":"The review is positive."},"genre":{"type":"choice","instructions":"Which genre is the book?","criteria":{"fantasy":"Magic, myth or invented worlds","mystery":"A crime or puzzle to solve","romance":"A love story"}},"rating":{"type":"score","instructions":"How much did the reviewer enjoy the book?","criteria":["Hated it","Disliked it","Neutral","Liked it","Loved it"]}}}}}},"responses":{"200":{"description":"Decision response","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/DecisionResponse"},"example":{"answers":{"genre":{"type":"choice","choice":"fantasy","confidence":1,"probabilities":{"fantasy":1,"mystery":0,"romance":0}},"positive":{"type":"noul","noul":0.73},"rating":{"type":"score","score":3.1,"confidence":0.87,"probabilities":[{"value":0,"probability":0.01},{"value":1,"probability":0},{"value":2,"probability":0},{"value":3,"probability":0.86},{"value":4,"probability":0.13}]}},"id":"rqsty-dcsn-15e2efde-f7c6-49cb-92ae-c763b1b16193","model":"gpt-6-luna","provider":"openai","usage":{"input_tokens":424,"output_tokens":0}}}}},"400":{"description":"Bad request - malformed payload, invalid parameters, or `assets` in the request.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"401":{"description":"Unauthorized - missing or empty Authorization header.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"402":{"description":"Payment required - organization balance exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"403":{"description":"Forbidden - invalid token or model not in access list.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"404":{"description":"Not found - provider\/model not supported.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"413":{"description":"Payload too large - the request body exceeds the 50 MB limit, or the state exceeds the model's context window.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Retry after the Retry-After header value.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"502":{"description":"Bad gateway - upstream provider returned an invalid response.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}}},"operationId":"createDecision"}},"\/v1\/systemone":{"servers":[{"url":"https:\/\/router.requesty.ai","description":"Inference router endpoint"}],"post":{"summary":"Create System One decision","description":"Ask typed questions about a piece of content in TypeSafe's System One format. Images go in `assets`, as JSON or as multipart form parts.","requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/SystemOneRequest"},"example":{"model":"openai\/gpt-6-luna","state":"The dragon heist in this fantasy novel had me hooked, but the ending dragged a little.","questions":{"positive":{"type":"noul","instructions":"The review is positive."},"genre":{"type":"choice","instructions":"Which genre is the book?","criteria":{"fantasy":"Magic, myth or invented worlds","mystery":"A crime or puzzle to solve","romance":"A love story"}},"rating":{"type":"score","instructions":"How much did the reviewer enjoy the book?","criteria":["Hated it","Disliked it","Neutral","Liked it","Loved it"]}}}},"multipart\/form-data":{"schema":{"$ref":"#\/components\/schemas\/SystemOneMultipartRequest"}}}},"responses":{"200":{"description":"Decision response","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/DecisionResponse"},"example":{"answers":{"genre":{"type":"choice","choice":"fantasy","confidence":1,"probabilities":{"fantasy":1,"mystery":0,"romance":0}},"positive":{"type":"noul","noul":0.73},"rating":{"type":"score","score":3.1,"confidence":0.87,"probabilities":[{"value":0,"probability":0.01},{"value":1,"probability":0},{"value":2,"probability":0},{"value":3,"probability":0.86},{"value":4,"probability":0.13}]}},"id":"rqsty-dcsn-15e2efde-f7c6-49cb-92ae-c763b1b16193","model":"gpt-6-luna","provider":"openai","usage":{"input_tokens":424,"output_tokens":0}}}}},"400":{"description":"Bad request - malformed payload, invalid parameters, or images inside `state`.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"401":{"description":"Unauthorized - missing or empty Authorization header.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"402":{"description":"Payment required - organization balance exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"403":{"description":"Forbidden - invalid token or model not in access list.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"404":{"description":"Not found - provider\/model not supported.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"413":{"description":"Payload too large - the request body exceeds the 50 MB limit, or the state exceeds the model's context window.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Retry after the Retry-After header value.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"502":{"description":"Bad gateway - upstream provider returned an invalid response.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}}},"operationId":"createSystemOneDecision"}},"\/v1\/images\/generations":{"servers":[{"url":"https:\/\/router.requesty.ai","description":"Inference router endpoint"}],"post":{"summary":"Create image","description":"Generate images from a text prompt using image generation models","requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ImageGenerationRequest"}}}},"responses":{"200":{"description":"Image generation response. With stream: true the body is a text\/event-stream of ImageStreamEvent objects","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ImageGenerationResponse"}},"text\/event-stream":{"schema":{"$ref":"#\/components\/schemas\/ImageStreamEvent"}}}},"400":{"description":"Bad request - malformed payload or invalid parameters.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"401":{"description":"Unauthorized - missing or empty Authorization header.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"402":{"description":"Payment required - organization balance exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"403":{"description":"Forbidden - invalid token or model not in access list.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"404":{"description":"Not found - provider\/model not supported.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"413":{"description":"Payload too large - the request body exceeds the 50 MB limit. Send fewer or smaller images and files, or compact the conversation history.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Retry after the Retry-After header value.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"502":{"description":"Bad gateway - upstream provider returned an invalid response.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}}},"operationId":"createImage"}},"\/v1\/images\/edits":{"servers":[{"url":"https:\/\/router.requesty.ai","description":"Inference router endpoint"}],"post":{"summary":"Edit image","description":"Edit or extend an existing image from a text prompt using image editing models. Accepts multipart\/form-data (for file uploads) or application\/json (with image_url entries as base64 data URLs; remote URLs are not downloaded).","requestBody":{"required":true,"content":{"multipart\/form-data":{"schema":{"$ref":"#\/components\/schemas\/ImageEditMultipartRequest"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ImageEditRequest"}}}},"responses":{"200":{"description":"Image edit response. With stream: true the body is a text\/event-stream of ImageStreamEvent objects","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ImageGenerationResponse"}},"text\/event-stream":{"schema":{"$ref":"#\/components\/schemas\/ImageStreamEvent"}}}},"400":{"description":"Bad request - malformed payload or invalid parameters.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"401":{"description":"Unauthorized - missing or empty Authorization header.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"413":{"description":"Payload too large"},"402":{"description":"Payment required - organization balance exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"403":{"description":"Forbidden - invalid token or model not in access list.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"404":{"description":"Not found - provider\/model not supported.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Retry after the Retry-After header value.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"502":{"description":"Bad gateway - upstream provider returned an invalid response.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}}},"operationId":"createImageEdit"}},"\/v1\/audio\/speech":{"servers":[{"url":"https:\/\/router.requesty.ai","description":"Inference router endpoint"}],"post":{"summary":"Create speech","description":"Synthesizes audio from input text using a text-to-speech model. By default the response is a binary audio stream in the requested format. When `stream_format` is `sse`, the response is a Server-Sent Events stream of `speech.audio.delta` and `speech.audio.done` events with base64-encoded audio chunks.","requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/SpeechRequest"}}}},"responses":{"200":{"description":"Audio bytes stream (when `stream_format` is `audio`) or Server-Sent Events stream (when `stream_format` is `sse`).","content":{"application\/octet-stream":{"schema":{"type":"string","format":"binary"}},"text\/event-stream":{"schema":{"type":"string","description":"Server-Sent Events stream of `speech.audio.delta` and `speech.audio.done` events."}}}},"400":{"description":"Bad request - malformed payload or invalid parameters.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"401":{"description":"Unauthorized - missing or empty Authorization header.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"413":{"description":"Payload too large - the request body exceeds the 50 MB limit. Send fewer or smaller images and files, or compact the conversation history.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Retry after the Retry-After header value.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"402":{"description":"Payment required - organization balance exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"403":{"description":"Forbidden - invalid token or model not in access list.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"404":{"description":"Not found - provider\/model not supported.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"502":{"description":"Bad gateway - upstream provider returned an invalid response.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}}},"operationId":"createSpeech"}},"\/v1\/audio\/transcriptions":{"servers":[{"url":"https:\/\/router.requesty.ai","description":"Inference router endpoint"}],"post":{"summary":"Create transcription","description":"Transcribes audio into text using a speech-to-text model. The audio file is sent as `multipart\/form-data`.","requestBody":{"required":true,"content":{"multipart\/form-data":{"schema":{"$ref":"#\/components\/schemas\/TranscriptionMultipartRequest"}}}},"responses":{"200":{"description":"Transcription result","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/TranscriptionResponse"}}}},"400":{"description":"Bad request - malformed payload or invalid parameters.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"401":{"description":"Unauthorized - missing or empty Authorization header.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"413":{"description":"Payload too large"},"429":{"description":"Rate limit exceeded. Retry after the Retry-After header value.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"402":{"description":"Payment required - organization balance exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"403":{"description":"Forbidden - invalid token or model not in access list.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"404":{"description":"Not found - provider\/model not supported.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"502":{"description":"Bad gateway - upstream provider returned an invalid response.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}}},"operationId":"createTranscription"}},"\/v1\/models\/all":{"servers":[{"url":"https:\/\/router.requesty.ai","description":"Inference router endpoint"}],"get":{"summary":"List available models across all modalities","description":"Get all available models of every modality in a single list. Each entry is the same object the modality specific endpoint returns, identified by its `api` field. If authenticated with a Requesty API key, returns only the models approved for your organization. Otherwise, returns all public models.","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{}],"responses":{"200":{"description":"List of available models","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/AllModelsResponse"},"example":{"object":"list","data":[{"api":"chat","id":"vertex\/claude-sonnet-4-5","object":"model","created":1747933971,"updated":1747933971,"owned_by":"system","input_price":3.0e-6,"caching_price":3.75e-6,"cached_price":3.0e-7,"output_price":1.5e-5,"pricing":[{"prompt_tokens_threshold":0,"input_price":3.0e-6,"caching_price":3.75e-6,"caching_5m_price":3.75e-6,"caching_1h_price":6.0e-6,"cached_price":3.0e-7,"output_price":1.5e-5},{"prompt_tokens_threshold":200000,"input_price":6.0e-6,"caching_price":7.5e-6,"caching_5m_price":7.5e-6,"caching_1h_price":1.2e-5,"cached_price":6.0e-7,"output_price":2.25e-5}],"max_output_tokens":64000,"context_window":200000,"supports_caching":true,"supports_vision":true,"supports_vision_inline":true,"supports_vision_url":false,"supports_computer_use":true,"supports_reasoning":true,"reasoning":{"supported_efforts":["none","min","low","medium","high","xhigh","max"]},"supports_image_generation":false,"supports_tool_calling":true,"supports_role_developer":false,"supports_web_search":true,"supports_output_json_object":true,"supports_output_json_schema":true,"description":"The first hybrid reasoning model on the market with the highest level of intelligence and capability with toggleable extended thinking. Top-tier results in reasoning, coding, multilingual tasks, long-context handling, honesty, and image processing.","data_retention":false,"data_retention_days":0,"data_used_for_training":false,"privacy_comments":"N\/A","geolocation":"global","open_weights":false,"model_lab":"vertex","model_canonical_name":"tbd"},{"api":"chat","id":"deepinfra\/mimo-v2.6-flash","object":"model","created":1790520673,"updated":1791474259,"owned_by":"system","input_price":1.4e-7,"cached_price":2.7e-9,"output_price":2.8e-7,"pricing":[{"prompt_tokens_threshold":0,"input_price":1.4e-7,"cached_price":2.7e-9,"output_price":2.8e-7}],"max_output_tokens":131072,"context_window":1048576,"supports_caching":true,"supports_vision":true,"supports_vision_inline":true,"supports_vision_url":true,"supports_computer_use":false,"supports_reasoning":true,"reasoning":{"supported_efforts":["none","low","medium","high","xhigh","max"]},"supports_image_generation":false,"supports_tool_calling":true,"supports_role_developer":false,"supports_web_search":false,"supports_output_json_object":true,"supports_output_json_schema":true,"supports_system_mid_conversation":true,"description":"MiMo-V2.6-Flash is the efficiency-balanced model in Xiaomi's MiMo-V2.6 series: a sparse Mixture-of-Experts model with 309B total and 15B activated parameters, natively omnimodal across text, image, video and audio, with a 1M-token context window. Trained with large-scale mixed reinforcement learning across coding, general agents, visual and cybersecurity tasks, it is built for agentic workloads such as long-horizon coding, tool use and computer use.","data_retention":false,"data_retention_days":0,"data_used_for_training":false,"privacy_comments":"N\/A","geolocation":"global","quantization":"fp8","hugging_face_id":"XiaomiMiMo\/MiMo-V2.6-Flash-RL","open_weights":true,"model_lab":"xiaomi","model_canonical_name":"mimo-v2.6-flash"},{"api":"embedding","id":"vertex\/google\/gemini-embedding-2-preview","object":"model","created":1774621394,"updated":1774621394,"owned_by":"system","pricing":{"input_text":2.0e-7,"input_audio":6.4e-6,"input_image":4.651162791e-7,"input_video":1.19696969697e-5,"input_document":4.651162791e-7},"data_retention":true,"data_retention_days":0,"data_used_for_training":true,"privacy_comments":"","geolocation":"global"},{"api":"image","id":"openai\/gpt-image-2","object":"model","created":1776868154,"updated":1776868154,"owned_by":"system","pricing":{"input_text":5.0e-6,"input_image":8.0e-6,"output_text":1.0e-5,"output_image":3.0e-5},"data_retention":true,"data_retention_days":0,"data_used_for_training":true,"privacy_comments":"","geolocation":"global"},{"api":"transcription","id":"openai\/whisper-1","object":"model","created":1767023142,"updated":1767023142,"owned_by":"system","pricing":{"input_second":0.0001},"data_retention":true,"data_retention_days":0,"data_used_for_training":true,"privacy_comments":"","geolocation":"global"},{"api":"transcription","id":"openai\/gpt-4o-transcribe","object":"model","created":1767023142,"updated":1767023142,"owned_by":"system","pricing":{"input_token":2.5e-6,"output_token":1.0e-5},"data_retention":true,"data_retention_days":0,"data_used_for_training":true,"privacy_comments":"","geolocation":"global"},{"api":"speech","id":"openai\/gpt-audio-mini","object":"model","created":1776935721,"updated":1776935721,"owned_by":"system","pricing":{"input_token":6.0e-7,"output_token":2.4e-6},"data_retention":true,"data_retention_days":0,"data_used_for_training":true,"privacy_comments":"","geolocation":"global"},{"api":"speech","id":"openai\/tts-1","object":"model","created":1767023142,"updated":1767023142,"owned_by":"system","pricing":{"input_character":1.5e-5},"data_retention":true,"data_retention_days":0,"data_used_for_training":true,"privacy_comments":"","geolocation":"global"}]}}}},"401":{"description":"Unauthorized - missing or empty Authorization header.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"400":{"description":"Bad request - malformed payload or invalid parameters.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"402":{"description":"Payment required - organization balance exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"403":{"description":"Forbidden - the API key provided in Authorization or X-Api-Key is invalid, expired or revoked. Omit the header to list public models anonymously.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"404":{"description":"Not found - provider\/model not supported.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Retry after the Retry-After header value.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"502":{"description":"Bad gateway - upstream provider returned an invalid response.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}}},"operationId":"listAllModels"}},"\/v1\/models":{"servers":[{"url":"https:\/\/router.requesty.ai","description":"Inference router endpoint"}],"get":{"summary":"List available models","description":"Get all available chat models. This endpoint is an alias of `GET \/v1\/models\/chat`, kept for compatibility with most tools and SDKs. If authenticated with a Requesty API key, returns only the models approved for your organization. Otherwise, returns all public models.","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{}],"responses":{"200":{"description":"List of available models","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ModelsResponse"},"example":{"object":"list","data":[{"api":"chat","id":"vertex\/claude-sonnet-4-5","object":"model","created":1747933971,"updated":1747933971,"owned_by":"system","input_price":3.0e-6,"caching_price":3.75e-6,"cached_price":3.0e-7,"output_price":1.5e-5,"pricing":[{"prompt_tokens_threshold":0,"input_price":3.0e-6,"caching_price":3.75e-6,"caching_5m_price":3.75e-6,"caching_1h_price":6.0e-6,"cached_price":3.0e-7,"output_price":1.5e-5},{"prompt_tokens_threshold":200000,"input_price":6.0e-6,"caching_price":7.5e-6,"caching_5m_price":7.5e-6,"caching_1h_price":1.2e-5,"cached_price":6.0e-7,"output_price":2.25e-5}],"max_output_tokens":64000,"context_window":200000,"supports_caching":true,"supports_vision":true,"supports_vision_inline":true,"supports_vision_url":false,"supports_computer_use":true,"supports_reasoning":true,"reasoning":{"supported_efforts":["none","min","low","medium","high","xhigh","max"]},"supports_image_generation":false,"supports_tool_calling":true,"supports_role_developer":false,"supports_web_search":true,"supports_output_json_object":true,"supports_output_json_schema":true,"description":"The first hybrid reasoning model on the market with the highest level of intelligence and capability with toggleable extended thinking. Top-tier results in reasoning, coding, multilingual tasks, long-context handling, honesty, and image processing.","data_retention":false,"data_retention_days":0,"data_used_for_training":false,"privacy_comments":"N\/A","geolocation":"global","open_weights":false,"model_lab":"vertex","model_canonical_name":"tbd"},{"api":"chat","id":"deepinfra\/mimo-v2.6-flash","object":"model","created":1790520673,"updated":1791474259,"owned_by":"system","input_price":1.4e-7,"cached_price":2.7e-9,"output_price":2.8e-7,"pricing":[{"prompt_tokens_threshold":0,"input_price":1.4e-7,"cached_price":2.7e-9,"output_price":2.8e-7}],"max_output_tokens":131072,"context_window":1048576,"supports_caching":true,"supports_vision":true,"supports_vision_inline":true,"supports_vision_url":true,"supports_computer_use":false,"supports_reasoning":true,"reasoning":{"supported_efforts":["none","low","medium","high","xhigh","max"]},"supports_image_generation":false,"supports_tool_calling":true,"supports_role_developer":false,"supports_web_search":false,"supports_output_json_object":true,"supports_output_json_schema":true,"supports_system_mid_conversation":true,"description":"MiMo-V2.6-Flash is the efficiency-balanced model in Xiaomi's MiMo-V2.6 series: a sparse Mixture-of-Experts model with 309B total and 15B activated parameters, natively omnimodal across text, image, video and audio, with a 1M-token context window. Trained with large-scale mixed reinforcement learning across coding, general agents, visual and cybersecurity tasks, it is built for agentic workloads such as long-horizon coding, tool use and computer use.","data_retention":false,"data_retention_days":0,"data_used_for_training":false,"privacy_comments":"N\/A","geolocation":"global","quantization":"fp8","hugging_face_id":"XiaomiMiMo\/MiMo-V2.6-Flash-RL","open_weights":true,"model_lab":"xiaomi","model_canonical_name":"mimo-v2.6-flash"}]}}}},"401":{"description":"Unauthorized - missing or empty Authorization header.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"400":{"description":"Bad request - malformed payload or invalid parameters.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"402":{"description":"Payment required - organization balance exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"403":{"description":"Forbidden - the API key provided in Authorization or X-Api-Key is invalid, expired or revoked. Omit the header to list public models anonymously.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"404":{"description":"Not found - provider\/model not supported.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Retry after the Retry-After header value.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"502":{"description":"Bad gateway - upstream provider returned an invalid response.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}}},"operationId":"listModels"}},"\/v1\/models\/chat":{"servers":[{"url":"https:\/\/router.requesty.ai","description":"Inference router endpoint"}],"get":{"summary":"List available chat models","description":"Get all available chat models. Identical to `GET \/v1\/models`, including your aliases and routing policies. If authenticated with a Requesty API key, returns only the models approved for your organization. Otherwise, returns all public models.","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{}],"responses":{"200":{"description":"List of available models","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ModelsResponse"},"example":{"object":"list","data":[{"api":"chat","id":"vertex\/claude-sonnet-4-5","object":"model","created":1747933971,"updated":1747933971,"owned_by":"system","input_price":3.0e-6,"caching_price":3.75e-6,"cached_price":3.0e-7,"output_price":1.5e-5,"pricing":[{"prompt_tokens_threshold":0,"input_price":3.0e-6,"caching_price":3.75e-6,"caching_5m_price":3.75e-6,"caching_1h_price":6.0e-6,"cached_price":3.0e-7,"output_price":1.5e-5},{"prompt_tokens_threshold":200000,"input_price":6.0e-6,"caching_price":7.5e-6,"caching_5m_price":7.5e-6,"caching_1h_price":1.2e-5,"cached_price":6.0e-7,"output_price":2.25e-5}],"max_output_tokens":64000,"context_window":200000,"supports_caching":true,"supports_vision":true,"supports_vision_inline":true,"supports_vision_url":false,"supports_computer_use":true,"supports_reasoning":true,"reasoning":{"supported_efforts":["none","min","low","medium","high","xhigh","max"]},"supports_image_generation":false,"supports_tool_calling":true,"supports_role_developer":false,"supports_web_search":true,"supports_output_json_object":true,"supports_output_json_schema":true,"description":"The first hybrid reasoning model on the market with the highest level of intelligence and capability with toggleable extended thinking. Top-tier results in reasoning, coding, multilingual tasks, long-context handling, honesty, and image processing.","data_retention":false,"data_retention_days":0,"data_used_for_training":false,"privacy_comments":"N\/A","geolocation":"global","open_weights":false,"model_lab":"vertex","model_canonical_name":"tbd"},{"api":"chat","id":"deepinfra\/mimo-v2.6-flash","object":"model","created":1790520673,"updated":1791474259,"owned_by":"system","input_price":1.4e-7,"cached_price":2.7e-9,"output_price":2.8e-7,"pricing":[{"prompt_tokens_threshold":0,"input_price":1.4e-7,"cached_price":2.7e-9,"output_price":2.8e-7}],"max_output_tokens":131072,"context_window":1048576,"supports_caching":true,"supports_vision":true,"supports_vision_inline":true,"supports_vision_url":true,"supports_computer_use":false,"supports_reasoning":true,"reasoning":{"supported_efforts":["none","low","medium","high","xhigh","max"]},"supports_image_generation":false,"supports_tool_calling":true,"supports_role_developer":false,"supports_web_search":false,"supports_output_json_object":true,"supports_output_json_schema":true,"supports_system_mid_conversation":true,"description":"MiMo-V2.6-Flash is the efficiency-balanced model in Xiaomi's MiMo-V2.6 series: a sparse Mixture-of-Experts model with 309B total and 15B activated parameters, natively omnimodal across text, image, video and audio, with a 1M-token context window. Trained with large-scale mixed reinforcement learning across coding, general agents, visual and cybersecurity tasks, it is built for agentic workloads such as long-horizon coding, tool use and computer use.","data_retention":false,"data_retention_days":0,"data_used_for_training":false,"privacy_comments":"N\/A","geolocation":"global","quantization":"fp8","hugging_face_id":"XiaomiMiMo\/MiMo-V2.6-Flash-RL","open_weights":true,"model_lab":"xiaomi","model_canonical_name":"mimo-v2.6-flash"}]}}}},"401":{"description":"Unauthorized - missing or empty Authorization header.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"400":{"description":"Bad request - malformed payload or invalid parameters.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"402":{"description":"Payment required - organization balance exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"403":{"description":"Forbidden - the API key provided in Authorization or X-Api-Key is invalid, expired or revoked. Omit the header to list public models anonymously.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"404":{"description":"Not found - provider\/model not supported.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Retry after the Retry-After header value.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"502":{"description":"Bad gateway - upstream provider returned an invalid response.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}}},"operationId":"listChatModels"}},"\/v1\/models\/embedding":{"servers":[{"url":"https:\/\/router.requesty.ai","description":"Inference router endpoint"}],"get":{"summary":"List available embedding models","description":"Get all available embedding models. If authenticated with a Requesty API key, returns only the models approved for your organization. Otherwise, returns all public models. Aliases and routing policies are chat-only and are never returned here.","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{}],"responses":{"200":{"description":"List of available models","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/EmbeddingModelsResponse"},"example":{"object":"list","data":[{"api":"embedding","id":"vertex\/google\/gemini-embedding-2-preview","object":"model","created":1774621394,"updated":1774621394,"owned_by":"system","pricing":{"input_text":2.0e-7,"input_audio":6.4e-6,"input_image":4.651162791e-7,"input_video":1.19696969697e-5,"input_document":4.651162791e-7},"data_retention":true,"data_retention_days":0,"data_used_for_training":true,"privacy_comments":"","geolocation":"global"}]}}}},"401":{"description":"Unauthorized - missing or empty Authorization header.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"400":{"description":"Bad request - malformed payload or invalid parameters.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"402":{"description":"Payment required - organization balance exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"403":{"description":"Forbidden - the API key provided in Authorization or X-Api-Key is invalid, expired or revoked. Omit the header to list public models anonymously.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"404":{"description":"Not found - provider\/model not supported.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Retry after the Retry-After header value.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"502":{"description":"Bad gateway - upstream provider returned an invalid response.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}}},"operationId":"listEmbeddingModels"}},"\/v1\/models\/image":{"servers":[{"url":"https:\/\/router.requesty.ai","description":"Inference router endpoint"}],"get":{"summary":"List available image models","description":"Get all available image models. If authenticated with a Requesty API key, returns only the models approved for your organization. Otherwise, returns all public models. Aliases and routing policies are chat-only and are never returned here.","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{}],"responses":{"200":{"description":"List of available models","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ImageModelsResponse"},"example":{"object":"list","data":[{"api":"image","id":"openai\/gpt-image-2","object":"model","created":1776868154,"updated":1776868154,"owned_by":"system","pricing":{"input_text":5.0e-6,"input_image":8.0e-6,"output_text":1.0e-5,"output_image":3.0e-5},"data_retention":true,"data_retention_days":0,"data_used_for_training":true,"privacy_comments":"","geolocation":"global"}]}}}},"401":{"description":"Unauthorized - missing or empty Authorization header.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"400":{"description":"Bad request - malformed payload or invalid parameters.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"402":{"description":"Payment required - organization balance exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"403":{"description":"Forbidden - the API key provided in Authorization or X-Api-Key is invalid, expired or revoked. Omit the header to list public models anonymously.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"404":{"description":"Not found - provider\/model not supported.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Retry after the Retry-After header value.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"502":{"description":"Bad gateway - upstream provider returned an invalid response.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}}},"operationId":"listImageModels"}},"\/v1\/models\/transcription":{"servers":[{"url":"https:\/\/router.requesty.ai","description":"Inference router endpoint"}],"get":{"summary":"List available transcription models","description":"Get all available transcription models. If authenticated with a Requesty API key, returns only the models approved for your organization. Otherwise, returns all public models. Aliases and routing policies are chat-only and are never returned here.","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{}],"responses":{"200":{"description":"List of available models","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/TranscriptionModelsResponse"},"example":{"object":"list","data":[{"api":"transcription","id":"openai\/whisper-1","object":"model","created":1767023142,"updated":1767023142,"owned_by":"system","pricing":{"input_second":0.0001},"data_retention":true,"data_retention_days":0,"data_used_for_training":true,"privacy_comments":"","geolocation":"global"},{"api":"transcription","id":"openai\/gpt-4o-transcribe","object":"model","created":1767023142,"updated":1767023142,"owned_by":"system","pricing":{"input_token":2.5e-6,"output_token":1.0e-5},"data_retention":true,"data_retention_days":0,"data_used_for_training":true,"privacy_comments":"","geolocation":"global"}]}}}},"401":{"description":"Unauthorized - missing or empty Authorization header.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"400":{"description":"Bad request - malformed payload or invalid parameters.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"402":{"description":"Payment required - organization balance exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"403":{"description":"Forbidden - the API key provided in Authorization or X-Api-Key is invalid, expired or revoked. Omit the header to list public models anonymously.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"404":{"description":"Not found - provider\/model not supported.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Retry after the Retry-After header value.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"502":{"description":"Bad gateway - upstream provider returned an invalid response.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}}},"operationId":"listTranscriptionModels"}},"\/v1\/models\/speech":{"servers":[{"url":"https:\/\/router.requesty.ai","description":"Inference router endpoint"}],"get":{"summary":"List available speech models","description":"Get all available speech models. If authenticated with a Requesty API key, returns only the models approved for your organization. Otherwise, returns all public models. Aliases and routing policies are chat-only and are never returned here.","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{}],"responses":{"200":{"description":"List of available models","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/SpeechModelsResponse"},"example":{"object":"list","data":[{"api":"speech","id":"openai\/gpt-audio-mini","object":"model","created":1776935721,"updated":1776935721,"owned_by":"system","pricing":{"input_token":6.0e-7,"output_token":2.4e-6},"data_retention":true,"data_retention_days":0,"data_used_for_training":true,"privacy_comments":"","geolocation":"global"},{"api":"speech","id":"openai\/tts-1","object":"model","created":1767023142,"updated":1767023142,"owned_by":"system","pricing":{"input_character":1.5e-5},"data_retention":true,"data_retention_days":0,"data_used_for_training":true,"privacy_comments":"","geolocation":"global"}]}}}},"401":{"description":"Unauthorized - missing or empty Authorization header.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"400":{"description":"Bad request - malformed payload or invalid parameters.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"402":{"description":"Payment required - organization balance exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"403":{"description":"Forbidden - the API key provided in Authorization or X-Api-Key is invalid, expired or revoked. Omit the header to list public models anonymously.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"404":{"description":"Not found - provider\/model not supported.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Retry after the Retry-After header value.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"502":{"description":"Bad gateway - upstream provider returned an invalid response.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}}},"operationId":"listSpeechModels"}},"\/v1\/models\/decision":{"servers":[{"url":"https:\/\/router.requesty.ai","description":"Inference router endpoint"}],"get":{"summary":"List available decision models","description":"Get all available decision models. If authenticated with a Requesty API key, returns only the models approved for your organization. Otherwise, returns all public models. Aliases and routing policies are chat-only and are never returned here.","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{}],"responses":{"200":{"description":"List of available models","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/DecisionModelsResponse"},"example":{"object":"list","data":[{"api":"decision","id":"openai\/gpt-6-luna","object":"model","created":1791294366,"updated":1791294366,"owned_by":"system","pricing":{"input":4.2e-8,"output":0},"data_retention":false,"data_retention_days":0,"data_used_for_training":false,"privacy_comments":"","geolocation":"global"}]}}}},"401":{"description":"Unauthorized - missing or empty Authorization header.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"400":{"description":"Bad request - malformed payload or invalid parameters.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"402":{"description":"Payment required - organization balance exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"403":{"description":"Forbidden - the API key provided in Authorization or X-Api-Key is invalid, expired or revoked. Omit the header to list public models anonymously.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"404":{"description":"Not found - provider\/model not supported.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Retry after the Retry-After header value.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"502":{"description":"Bad gateway - upstream provider returned an invalid response.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}}},"operationId":"listDecisionModels"}},"\/v1\/models\/managed":{"servers":[{"url":"https:\/\/router.requesty.ai","description":"Inference router endpoint"}],"get":{"summary":"List managed policies","description":"Get all Managed Policies maintained by Requesty. Each entry is a policy whose `id` can be used directly as the `model` in a request, without the `policy\/` prefix. No authentication is required and results are not scoped to an organization.","security":[{}],"responses":{"200":{"description":"List of managed policies","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ModelsResponse"},"example":{"object":"list","data":[{"api":"chat","id":"claude-sonnet-4-5","object":"model","created":1770317868,"owned_by":"system","input_price":3.3e-6,"cached_price":3.3e-7,"output_price":1.65e-5,"max_output_tokens":64000,"context_window":1000000,"supports_caching":true,"supports_vision":true,"supports_vision_inline":true,"supports_vision_url":true,"supports_reasoning":true,"supports_tool_calling":true,"geolocation":"us"},{"api":"chat","id":"gpt-5-mini@eu","object":"model","created":1783669626,"owned_by":"system","input_price":2.5e-7,"cached_price":2.5e-8,"output_price":2.0e-6,"max_output_tokens":128000,"context_window":400000,"supports_caching":true,"supports_vision":true,"supports_vision_inline":true,"supports_vision_url":true,"supports_reasoning":true,"supports_tool_calling":true,"geolocation":"eu"}]}}}},"500":{"description":"Internal server error.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}}},"operationId":"listManagedPolicies"}},"\/v1\/messages":{"servers":[{"url":"https:\/\/router.requesty.ai","description":"Inference router endpoint"}],"post":{"summary":"Create message","description":"Send a message to an Anthropic-compatible model and receive a response","security":[],"parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string"},"description":"Your Requesty API key"},{"name":"anthropic-version","in":"header","required":false,"schema":{"type":"string","default":"2023-06-01","example":"2023-06-01"},"description":"The version of the Anthropic API to use"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/MessageRequest"},"example":{"model":"anthropic\/claude-sonnet-5-5","max_tokens":1024,"messages":[{"role":"user","content":"Hello, Claude!"}]}}}},"responses":{"200":{"description":"Message response","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/MessageResponse"},"example":{"id":"msg_01ABC123","type":"message","role":"assistant","content":[{"type":"text","text":"Hello! I'm Claude, an AI assistant by Anthropic. How can I help you today?"}],"model":"anthropic\/claude-sonnet-5-5","stop_reason":"end_turn","usage":{"input_tokens":12,"output_tokens":20,"cost":0.000198}}}}},"400":{"description":"Bad request - malformed payload or invalid parameters.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"401":{"description":"Unauthorized - missing or empty Authorization header.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"402":{"description":"Payment required - organization balance exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"403":{"description":"Forbidden - invalid token or model not in access list.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"404":{"description":"Not found - provider\/model not supported.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"413":{"description":"Payload too large - the request body exceeds the 50 MB limit. Send fewer or smaller images and files, or compact the conversation history.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Retry after the Retry-After header value.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"502":{"description":"Bad gateway - upstream provider returned an invalid response.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}}},"operationId":"createMessage"}},"\/v1\/responses":{"servers":[{"url":"https:\/\/router.requesty.ai","description":"Inference router endpoint"}],"post":{"summary":"Create response","description":"Send input to an OpenAI-compatible model using the Responses API format and receive a response.","security":[{"bearerAuth":[]}],"parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string"},"description":"Your Requesty API key. Alternative to the standard `Authorization: Bearer` header."}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ResponsesRequest"},"example":{"model":"openai-responses\/gpt-5","input":"Tell me a three sentence bedtime story about a unicorn."}}}},"responses":{"200":{"description":"Response","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ResponsesResponse"},"example":{"id":"resp_abc123","object":"response","created_at":1748200000,"model":"openai-responses\/gpt-5","output":[{"type":"message","role":"assistant","content":[{"type":"output_text","text":"Once upon a time, a tiny unicorn named Sparkle discovered a rainbow bridge leading to a hidden meadow. She danced under the stars with fireflies until the moon sang her a lullaby. And every night after, Sparkle dreamed of adventures yet to come."}]}],"usage":{"input_tokens":15,"output_tokens":58,"total_tokens":73}}}}},"400":{"description":"Bad request - malformed payload or invalid parameters.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"401":{"description":"Unauthorized - missing or empty Authorization header.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"402":{"description":"Payment required - organization balance exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"403":{"description":"Forbidden - invalid token or model not in access list.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"404":{"description":"Not found - provider\/model not supported.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"413":{"description":"Payload too large - the request body exceeds the 50 MB limit. Send fewer or smaller images and files, or compact the conversation history.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Retry after the Retry-After header value.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"502":{"description":"Bad gateway - upstream provider returned an invalid response.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}}},"operationId":"createResponse"}},"\/v1\/manage\/apikey":{"servers":[{"url":"https:\/\/api-v2.requesty.ai","description":"Management API endpoint"}],"get":{"summary":"Get all API keys","description":"Retrieve all existing API keys for the organization","responses":{"200":{"description":"Successfully retrieved API keys","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/GetApiKeysResponse"}}}},"401":{"description":"Unauthorized - missing or empty Authorization header.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"403":{"description":"Forbidden - invalid token or model not in access list.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"400":{"description":"Bad request - malformed payload or invalid parameters.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"402":{"description":"Payment required - organization balance exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"404":{"description":"Not found - provider\/model not supported.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Retry after the Retry-After header value.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"502":{"description":"Bad gateway - upstream provider returned an invalid response.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}}},"operationId":"listApiKeys"},"post":{"summary":"Create new API key","description":"Create a new API key for the organization. By default, the new key is created alongside the management API key making the request, in the same group or service account. Set `group_id` or `service_account_id` to create it somewhere else. OAuth callers must set one of them; otherwise they get `400`.","requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/CreateApiKeyRequest"}}}},"responses":{"200":{"description":"API key created successfully","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/CreateApiKeyResponse"}}}},"400":{"description":"Bad request - malformed payload or invalid parameters.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"401":{"description":"Unauthorized - missing or empty Authorization header.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"403":{"description":"Forbidden - invalid token or model not in access list.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"402":{"description":"Payment required - organization balance exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"404":{"description":"Not found - provider\/model not supported.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Retry after the Retry-After header value.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"502":{"description":"Bad gateway - upstream provider returned an invalid response.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}}},"operationId":"createApiKey"}},"\/v1\/manage\/apikey\/{id}":{"servers":[{"url":"https:\/\/api-v2.requesty.ai","description":"Management API endpoint"}],"get":{"summary":"Get API key","description":"Get information about a specific API key. An API key can query about itself, or about other keys if it has manage read permissions.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The UUID of the API key to retrieve, or 'self' to query the calling API key"}],"responses":{"200":{"description":"Successfully retrieved API key information","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ApiKeyInfoResponse"}}}},"401":{"description":"Unauthorized - missing or empty Authorization header.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"403":{"description":"Forbidden - invalid token or model not in access list.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"404":{"description":"Not found - provider\/model not supported.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"400":{"description":"Bad request - malformed payload or invalid parameters.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"402":{"description":"Payment required - organization balance exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Retry after the Retry-After header value.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"502":{"description":"Bad gateway - upstream provider returned an invalid response.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}}},"operationId":"getApiKey"},"delete":{"summary":"Delete API key","description":"Delete a specific API key","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"API key deleted successfully"},"400":{"description":"Bad request - malformed payload or invalid parameters.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"401":{"description":"Unauthorized - missing or empty Authorization header.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"402":{"description":"Payment required - organization balance exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"403":{"description":"Forbidden - invalid token or model not in access list.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"404":{"description":"Not found - provider\/model not supported.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Retry after the Retry-After header value.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"502":{"description":"Bad gateway - upstream provider returned an invalid response.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}}},"operationId":"deleteApiKey"}},"\/v1\/manage\/apikey\/{id}\/usage":{"servers":[{"url":"https:\/\/api-v2.requesty.ai","description":"Management API endpoint"}],"get":{"summary":"Get API key usage","description":"Get usage statistics for a specific API key within a date range","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/GetApiKeyUsageRequest"}}}},"responses":{"200":{"description":"Successfully retrieved usage data","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/GetApiKeyUsageResponse"}}}},"400":{"description":"Bad request - malformed payload or invalid parameters.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"401":{"description":"Unauthorized - missing or empty Authorization header.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"402":{"description":"Payment required - organization balance exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"403":{"description":"Forbidden - invalid token or model not in access list.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"404":{"description":"Not found - provider\/model not supported.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Retry after the Retry-After header value.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"502":{"description":"Bad gateway - upstream provider returned an invalid response.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}}},"operationId":"getApiKeyUsage"}},"\/v1\/manage\/apikey\/{id}\/limit":{"servers":[{"url":"https:\/\/api-v2.requesty.ai","description":"Management API endpoint"}],"post":{"summary":"Update API key monthly limit","description":"Update the monthly spending limit for a specific API key","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/UpdateLimitRequest"}}}},"responses":{"204":{"description":"Monthly limit updated successfully"},"400":{"description":"Bad request - malformed payload or invalid parameters.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"401":{"description":"Unauthorized - missing or empty Authorization header.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"402":{"description":"Payment required - organization balance exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"403":{"description":"Forbidden - invalid token or model not in access list.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"404":{"description":"Not found - provider\/model not supported.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Retry after the Retry-After header value.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"502":{"description":"Bad gateway - upstream provider returned an invalid response.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}}},"operationId":"updateApiKeyLimit"}},"\/v1\/manage\/apikey\/{id}\/label":{"servers":[{"url":"https:\/\/api-v2.requesty.ai","description":"Management API endpoint"}],"post":{"summary":"Update API key labels","description":"Update labels for an API key. Setting an empty object will remove all labels.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/UpdateLabelRequest"}}}},"responses":{"204":{"description":"Labels updated successfully"},"400":{"description":"Bad request - malformed payload or invalid parameters.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"401":{"description":"Unauthorized - missing or empty Authorization header.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"402":{"description":"Payment required - organization balance exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"403":{"description":"Forbidden - invalid token or model not in access list.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"404":{"description":"Not found - provider\/model not supported.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Retry after the Retry-After header value.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"502":{"description":"Bad gateway - upstream provider returned an invalid response.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}}},"operationId":"updateApiKeyLabel"}},"\/v1\/manage\/apikey\/{id}\/expiry":{"servers":[{"url":"https:\/\/api-v2.requesty.ai","description":"Management API endpoint"}],"post":{"summary":"Update API key expiry","description":"Update the expiry date for an API key. If expires_at is not set or is null, the current expiry will be removed, making the API key non-expiring.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/UpdateExpiryRequest"}}}},"responses":{"204":{"description":"Expiry updated successfully"},"400":{"description":"Bad request - malformed payload or invalid parameters.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"401":{"description":"Unauthorized - missing or empty Authorization header.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"403":{"description":"Forbidden - invalid token or model not in access list.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"404":{"description":"Not found - provider\/model not supported.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"402":{"description":"Payment required - organization balance exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Retry after the Retry-After header value.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"502":{"description":"Bad gateway - upstream provider returned an invalid response.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}}},"operationId":"updateApiKeyExpiry"}},"\/v1\/manage\/group":{"servers":[{"url":"https:\/\/api-v2.requesty.ai","description":"Management API endpoint"}],"get":{"summary":"List groups","description":"List all groups in your organization.","responses":{"200":{"description":"Successfully retrieved groups","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/GetGroupsResponse"}}}},"401":{"description":"Unauthorized - missing or empty Authorization header.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"403":{"description":"Forbidden - invalid token or model not in access list.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"400":{"description":"Bad request - malformed payload or invalid parameters.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"402":{"description":"Payment required - organization balance exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"404":{"description":"Not found - provider\/model not supported.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Retry after the Retry-After header value.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"502":{"description":"Bad gateway - upstream provider returned an invalid response.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}}},"operationId":"listGroups"},"post":{"summary":"Create group","description":"Create a new group in your organization. `monthly_limit` sets the group's total monthly budget. New groups start with the organization's group defaults (monthly budgets, access list, and guardrails); `monthly_limit`, when sent, overrides the default budget.","requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/CreateGroupRequest"}}}},"responses":{"200":{"description":"Group created successfully","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/CreateGroupResponse"}}}},"400":{"description":"Bad request - malformed payload or invalid parameters.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"401":{"description":"Unauthorized - missing or empty Authorization header.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"403":{"description":"Forbidden - invalid token or model not in access list.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"402":{"description":"Payment required - organization balance exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"404":{"description":"Not found - provider\/model not supported.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Retry after the Retry-After header value.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"502":{"description":"Bad gateway - upstream provider returned an invalid response.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}}},"operationId":"createGroup"}},"\/v1\/manage\/group\/{id}":{"servers":[{"url":"https:\/\/api-v2.requesty.ai","description":"Management API endpoint"}],"get":{"summary":"Get group","description":"Get detailed information about a specific group including its members.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The group ID","example":"123e4567-e89b-12d3-a456-426614174000"}],"responses":{"200":{"description":"Successfully retrieved group","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/GetGroupResponse"}}}},"401":{"description":"Unauthorized - missing or empty Authorization header.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"403":{"description":"Forbidden - invalid token or model not in access list.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"404":{"description":"Not found - provider\/model not supported.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"400":{"description":"Bad request - malformed payload or invalid parameters.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"402":{"description":"Payment required - organization balance exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Retry after the Retry-After header value.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"502":{"description":"Bad gateway - upstream provider returned an invalid response.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}}},"operationId":"getGroup"},"delete":{"summary":"Delete group","description":"Delete a group from your organization","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The group ID","example":"123e4567-e89b-12d3-a456-426614174000"}],"responses":{"204":{"description":"Group deleted successfully"},"400":{"description":"Bad request - malformed payload or invalid parameters.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"401":{"description":"Unauthorized - missing or empty Authorization header.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"403":{"description":"Forbidden - invalid token or model not in access list.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"404":{"description":"Not found - provider\/model not supported.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"402":{"description":"Payment required - organization balance exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Retry after the Retry-After header value.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"502":{"description":"Bad gateway - upstream provider returned an invalid response.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}}},"operationId":"deleteGroup"}},"\/v1\/manage\/group\/{id}\/budget":{"servers":[{"url":"https:\/\/api-v2.requesty.ai","description":"Management API endpoint"}],"patch":{"summary":"Update group budget","description":"Set the group's total monthly budget. Set `monthly_budget` to `0` for unlimited spending. Requires an API key with manage permissions.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The group ID","example":"123e4567-e89b-12d3-a456-426614174000"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/UpdateGroupBudgetRequest"}}}},"responses":{"200":{"description":"Group budget updated successfully"},"400":{"description":"Bad request - invalid group ID or request body.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"401":{"description":"Unauthorized - missing or invalid Authorization header.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"403":{"description":"Forbidden - API key does not have manage permissions.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"404":{"description":"Not found - the group does not exist.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}}},"operationId":"updateGroupBudget"}},"\/v1\/manage\/group\/{id}\/budget-per-user":{"servers":[{"url":"https:\/\/api-v2.requesty.ai","description":"Management API endpoint"}],"patch":{"summary":"Update group per-user budget","description":"Set the monthly budget applied to each user in the group. Set `monthly_budget_per_user` to `0` for unlimited spending per user. Requires an API key with manage permissions.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The group ID","example":"123e4567-e89b-12d3-a456-426614174000"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/UpdateGroupBudgetPerUserRequest"}}}},"responses":{"200":{"description":"Group per-user budget updated successfully"},"400":{"description":"Bad request - invalid group ID or request body.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"401":{"description":"Unauthorized - missing or invalid Authorization header.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"403":{"description":"Forbidden - API key does not have manage permissions.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"404":{"description":"Not found - the group does not exist.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}}},"operationId":"updateGroupBudgetPerUser"}},"\/v1\/manage\/group\/{id}\/label":{"servers":[{"url":"https:\/\/api-v2.requesty.ai","description":"Management API endpoint"}],"patch":{"summary":"Update group labels","description":"Update labels for a group. The request body replaces the entire `labels` map stored for the group. Setting an empty object clears all labels. Requires an API key with manage permissions.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The group ID","example":"123e4567-e89b-12d3-a456-426614174000"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/UpdateGroupLabelsRequest"}}}},"responses":{"200":{"description":"Group labels updated successfully"},"400":{"description":"Bad request - invalid group ID or request body.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"401":{"description":"Unauthorized - missing or invalid Authorization header.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"403":{"description":"Forbidden - API key does not have manage permissions.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"404":{"description":"Not found - the group does not exist.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}}},"operationId":"updateGroupLabels"}},"\/v1\/manage\/group\/{id}\/member":{"servers":[{"url":"https:\/\/api-v2.requesty.ai","description":"Management API endpoint"}],"post":{"summary":"Add group member","description":"Add a member to a group in your organization. The member will be assigned the specified role.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The group ID","example":"123e4567-e89b-12d3-a456-426614174000"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/AddMemberRequest"}}}},"responses":{"204":{"description":"Member added successfully"},"400":{"description":"Bad request - malformed payload or invalid parameters.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"401":{"description":"Unauthorized - missing or empty Authorization header.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"403":{"description":"Forbidden - invalid token or model not in access list.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"404":{"description":"Not found - provider\/model not supported.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"409":{"description":"Conflict - member is already in the group"},"402":{"description":"Payment required - organization balance exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Retry after the Retry-After header value.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"502":{"description":"Bad gateway - upstream provider returned an invalid response.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}}},"operationId":"addGroupMember"},"delete":{"summary":"Remove group member","description":"Remove a member from a group.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The group ID","example":"123e4567-e89b-12d3-a456-426614174000"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/RemoveMemberRequest"}}}},"responses":{"204":{"description":"Member removed successfully"},"400":{"description":"Bad request - malformed payload or invalid parameters.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"401":{"description":"Unauthorized - missing or empty Authorization header.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"403":{"description":"Forbidden - invalid token or model not in access list.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"404":{"description":"Not found - provider\/model not supported.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"402":{"description":"Payment required - organization balance exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Retry after the Retry-After header value.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"502":{"description":"Bad gateway - upstream provider returned an invalid response.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}}},"operationId":"removeGroupMember"}},"\/v1\/manage\/org\/member":{"servers":[{"url":"https:\/\/api-v2.requesty.ai","description":"Management API endpoint"}],"get":{"summary":"List organization members","description":"Retrieve all members of the organization. Returns each member's user ID, email, first name, and last name. Use the returned user IDs to add members to groups via the group member endpoints.","responses":{"200":{"description":"Successfully retrieved organization members","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/GetOrgMembersResponse"}}}},"401":{"description":"Unauthorized - missing or empty Authorization header.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"403":{"description":"Forbidden - invalid token or model not in access list.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"400":{"description":"Bad request - malformed payload or invalid parameters.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"402":{"description":"Payment required - organization balance exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"404":{"description":"Not found - provider\/model not supported.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Retry after the Retry-After header value.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"502":{"description":"Bad gateway - upstream provider returned an invalid response.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}}},"operationId":"listOrgMembers"}},"\/v1\/manage\/org\/member\/{user_id}":{"delete":{"summary":"Delete organization member","description":"Offboard a member from your organization. The member is removed from the organization in the identity provider so they can no longer access it, all API keys they created in the organization are invalidated, and they are removed from all of the organization's groups. The member keeps their account and any other organization memberships; if they sign in with no memberships left, a fresh default organization is created for them. Requires an API key with write manage permissions. The endpoint is idempotent: calling it for a user who is not (or no longer) a member returns 200, so it is safe to retry after a partial failure.","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string"},"description":"The user ID of the member, as returned by the list organization members endpoint","example":"user_2abCdEfGhIjKlMnOpQrStUvWxYz"}],"responses":{"200":{"description":"Member offboarded successfully (also returned when the user is not a member, making retries safe)"},"400":{"description":"Bad request - missing or invalid user ID.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"401":{"description":"Unauthorized - missing or invalid Authorization header.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"403":{"description":"Forbidden - API key does not have write manage permissions.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"502":{"description":"Bad gateway - the identity provider could not remove the user from the organization. The user's API keys and data in your organization have already been invalidated; retry the request to complete the removal.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}}},"operationId":"deleteOrgMember"},"servers":[{"url":"https:\/\/api-v2.requesty.ai","description":"Management API endpoint"}]},"\/v1\/manage\/service-account":{"servers":[{"url":"https:\/\/api-v2.requesty.ai","description":"Management API endpoint"}],"get":{"summary":"List service accounts","description":"Retrieve all service accounts in the organization. Returns each service account's ID, name, and the ID of the user who created it. Pass a returned `id` as `service_account_id` to `POST \/v1\/manage\/apikey` to create a key under that service account. Requires an API key with manage read or write permission.","responses":{"200":{"description":"Successfully retrieved service accounts","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ListServiceAccountsResponse"},"example":{"service_accounts":[{"id":"3f6c2a1e-8b4d-4c7a-9e2f-5d1b7a9c0e42","name":"Production API","author_id":"user_2abcDEF123ghiJKL456mno"},{"id":"9a1d4e7b-2c3f-4b5a-8d6e-0f1a2b3c4d5e","name":"CI pipeline","author_id":"user_2abcDEF123ghiJKL456mno"}]}}}},"401":{"description":"Unauthorized - missing or invalid API key.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"403":{"description":"Forbidden - API key does not have manage permissions.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}}},"operationId":"listServiceAccounts"}},"\/v1\/manage\/org":{"servers":[{"url":"https:\/\/api-v2.requesty.ai","description":"Management API endpoint"}],"get":{"summary":"Get information about organization","description":"Get information about organization","responses":{"200":{"description":"Successfully retrieved organization info","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/GetOrgResponse"}}}},"401":{"description":"Unauthorized - missing or empty Authorization header.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"403":{"description":"Forbidden - invalid token or model not in access list.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"400":{"description":"Bad request - malformed payload or invalid parameters.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"402":{"description":"Payment required - organization balance exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"404":{"description":"Not found - provider\/model not supported.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Retry after the Retry-After header value.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"502":{"description":"Bad gateway - upstream provider returned an invalid response.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}}},"operationId":"getOrg"}},"\/v1\/manage\/org\/usage":{"servers":[{"url":"https:\/\/api-v2.requesty.ai","description":"Management API endpoint"}],"get":{"summary":"Get organization usage","description":"Get aggregated usage statistics for your entire organization within a date range. Supports aggregation by different time periods and optional grouping by user, model, or custom fields.","parameters":[{"name":"start","in":"query","required":true,"schema":{"type":"string","format":"date-time","example":"2025-01-01T00:00:00Z"},"description":"Start date in RFC3339 format (e.g., 2025-01-01T00:00:00Z). Required. The date range cannot exceed 100 days from start to end."},{"name":"end","in":"query","required":false,"schema":{"type":"string","format":"date-time","example":"2025-01-31T23:59:59Z"},"description":"End date in RFC3339 format (e.g., 2025-01-31T23:59:59Z). Optional. Defaults to 24 hours from start if not specified. Must be after start date. The date range cannot exceed 100 days."},{"name":"resolution","in":"query","required":false,"schema":{"type":"string","enum":["hour","day","month"],"default":"day"},"description":"Time resolution for aggregation"},{"name":"group_by","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"}},"description":"Fields to group by: group_name, group_id, member_id, member_email, user_id, api_key_id, model_requested, model_used, provider_used, is_byok, origin_title, user_agent, api, finish_reason, status_code, extra.<field_name>, api_key_label.<label_key>, or group_label.<label_key>. Rows missing a requested label are grouped under \"Unknown\". Grouping by api returns one group per request type: chat, embedding, image, speech, transcription, or decision. Grouping by user_agent returns one group per client, taken from the User-Agent header with version numbers and parenthesised comments removed and lowercased (for example claude-cli\/2.1.221 (external, cli) becomes claude-cli\/). Grouping by finish_reason returns one group per finish reason, for example stop or tool_calls, so a coding agent turn that makes several tool calls and ends with stop can be counted by its stop rows. Grouping by status_code returns one group per HTTP status code, with 0 for successful requests. Can be specified multiple times."}],"responses":{"200":{"description":"Successfully retrieved usage data","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/GetOrgUsageResponse"}}}},"400":{"description":"Bad request - malformed payload or invalid parameters.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"401":{"description":"Unauthorized - missing or empty Authorization header.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"403":{"description":"Forbidden - invalid token or model not in access list.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"402":{"description":"Payment required - organization balance exhausted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"404":{"description":"Not found - provider\/model not supported.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Retry after the Retry-After header value.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"502":{"description":"Bad gateway - upstream provider returned an invalid response.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}}},"operationId":"getOrgUsage"}},"\/v1\/manage\/org\/audit-log":{"servers":[{"url":"https:\/\/api-v2.requesty.ai","description":"Management API endpoint"}],"get":{"summary":"List audit logs","description":"List your organization's audit logs, newest first: the same configuration changes shown under Audit Logs in the dashboard. Each log has its `type`, a human-readable `log` description and a `timestamp`; `total` counts every log matching the request across all pages. Select the time range with `start`\/`end` or `period` (default `7d`, at most 365 days), filter by one or more `type` values, and page with `offset` and `limit`. Requires an API key with manage read or write permission.","parameters":[{"name":"start","in":"query","required":false,"schema":{"type":"string","format":"date-time","example":"2026-11-01T00:00:00Z"},"description":"Start of the time range in RFC 3339 format. Takes precedence over `period`. The range from `start` to `end` cannot exceed 365 days."},{"name":"end","in":"query","required":false,"schema":{"type":"string","format":"date-time","example":"2026-11-23T00:00:00Z"},"description":"End of the time range in RFC 3339 format. Requires `start`; defaults to now when `start` is set without `end`. Must not be before `start`."},{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"7d","example":"30d"},"description":"Relative time range ending now, used when `start` is not set: `<N>h` (up to `168h`), `<N>d` (up to `365d`) or `<N>m` (30-day months, up to `12m`), or one of `this_week`, `this_month`, `this_quarter`, `this_year`. Defaults to `7d`."},{"name":"type","in":"query","required":false,"style":"form","explode":true,"schema":{"type":"array","items":{"type":"string"},"example":["create_api_key","delete_api_key"]},"description":"Only return logs of this type, for example `create_api_key`, `delete_api_key` or `create_policy`. Repeat the parameter to include several types. An unknown type returns `400`. Omit to return every type."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0},"description":"Number of logs to skip. Defaults to 0; a negative or invalid value falls back to the default."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":1000,"default":50},"description":"Maximum number of logs to return, up to 1000. Defaults to 50; a value outside 1 to 1000 falls back to the default."}],"responses":{"200":{"description":"Successfully retrieved audit logs","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ListAuditLogsResponse"},"example":{"logs":[{"type":"create_api_key","log":"admin@example.com created API key Production API","timestamp":"2026-11-22T14:03:27Z"},{"type":"delete_api_key","log":"admin@example.com deleted API key Old CI key","timestamp":"2026-11-21T09:41:05Z"}],"total":2}}}},"400":{"description":"Bad request - invalid time range or unknown audit log type.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"401":{"description":"Unauthorized - missing or invalid API key.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"403":{"description":"Forbidden - API key does not have manage permissions.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}}},"operationId":"listAuditLogs"}},"\/v1\/manage\/group\/{group_id}\/member\/{member_id}\/role":{"servers":[{"url":"https:\/\/api-v2.requesty.ai","description":"Management API endpoint"}],"put":{"summary":"Update group member role","description":"Update the role of a member in a group. The group must belong to the organization the API key was issued for. Requires an API key with write manage permissions.","parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The group ID","example":"123e4567-e89b-12d3-a456-426614174000"},{"name":"member_id","in":"path","required":true,"schema":{"type":"string"},"description":"The user ID of the member whose role should be updated","example":"user_2abCdEfGhIjKlMnOpQrStUvWxYz"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/UpdateMemberRoleRequest"}}}},"responses":{"200":{"description":"Member role updated successfully"},"400":{"description":"Bad request - invalid group ID, member ID, or role.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"401":{"description":"Unauthorized - missing or invalid Authorization header.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"403":{"description":"Forbidden - API key does not have write manage permissions.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"404":{"description":"Not found - the group or member does not exist, or belongs to another organization.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}}},"operationId":"updateGroupMemberRole"}},"\/v1\/manage\/group\/{group_id}\/member\/{member_id}\/budget-override":{"servers":[{"url":"https:\/\/api-v2.requesty.ai","description":"Management API endpoint"}],"put":{"summary":"Update group member budget override","description":"Set or clear a per-member monthly budget override within a group. When set, it replaces the group's budget per user for this member. Pass `null` to remove the override and fall back to the group's budget per user. Requires an API key with write manage permissions.","parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The group ID","example":"123e4567-e89b-12d3-a456-426614174000"},{"name":"member_id","in":"path","required":true,"schema":{"type":"string"},"description":"The user ID of the member whose budget override should be updated","example":"user_2abCdEfGhIjKlMnOpQrStUvWxYz"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/UpdateMemberBudgetOverrideRequest"}}}},"responses":{"200":{"description":"Budget override updated successfully"},"400":{"description":"Bad request - invalid group ID or member ID.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"401":{"description":"Unauthorized - missing or invalid Authorization header.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"403":{"description":"Forbidden - API key does not have write manage permissions.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"404":{"description":"Not found - the group or member does not exist, or belongs to another organization.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}}},"operationId":"updateGroupMemberBudgetOverride"}},"\/v1\/manage\/access-list":{"servers":[{"url":"https:\/\/api-v2.requesty.ai","description":"Management API endpoint"}],"get":{"summary":"List access lists","description":"Retrieve all access lists in the organization. Requires an API key with read manage permissions.","responses":{"200":{"description":"Successfully retrieved access lists","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ListAccessListsResponse"}}}},"401":{"description":"Unauthorized - missing or invalid Authorization header.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"403":{"description":"Forbidden - API key does not have read manage permissions.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}}},"operationId":"listAccessLists"},"post":{"summary":"Create access list","description":"Create a new access list in the organization. An access list defines which models are allowed for API keys or groups it is attached to. Requires an API key with write manage permissions.","requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/CreateAccessListRequest"}}}},"responses":{"200":{"description":"Access list created successfully","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/CreateAccessListResponse"}}}},"400":{"description":"Bad request - invalid name or model list.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"401":{"description":"Unauthorized - missing or invalid Authorization header.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"403":{"description":"Forbidden - API key does not have write manage permissions.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}}},"operationId":"createAccessList"}},"\/v1\/manage\/access-list\/{access_list_id}":{"servers":[{"url":"https:\/\/api-v2.requesty.ai","description":"Management API endpoint"}],"get":{"summary":"Get access list","description":"Retrieve a specific access list by ID. Requires an API key with read manage permissions.","parameters":[{"name":"access_list_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The access list ID","example":"123e4567-e89b-12d3-a456-426614174000"}],"responses":{"200":{"description":"Successfully retrieved access list","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/GetAccessListResponse"}}}},"400":{"description":"Bad request - invalid access list ID.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"401":{"description":"Unauthorized - missing or invalid Authorization header.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"403":{"description":"Forbidden - API key does not have read manage permissions.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"404":{"description":"Not found - access list does not exist.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}}},"operationId":"getAccessList"},"patch":{"summary":"Update access list","description":"Update an access list's name, allowed models, or auto-approve setting. `name` and `auto_approve` only change when included. The model fields are a set operation, not an add: if the request includes any model field, the list ends up with exactly the models sent and every modality left out is cleared. To add models, get the list, edit the arrays and send all modalities back. Requires an API key with write manage permissions.","parameters":[{"name":"access_list_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The access list ID","example":"123e4567-e89b-12d3-a456-426614174000"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/UpdateAccessListRequest"}}}},"responses":{"200":{"description":"Access list updated successfully"},"400":{"description":"Bad request - invalid name or model list, or no fields provided.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"401":{"description":"Unauthorized - missing or invalid Authorization header.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"403":{"description":"Forbidden - API key does not have write manage permissions.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"404":{"description":"Not found - access list does not exist.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}}},"operationId":"updateAccessList"},"delete":{"summary":"Delete access list","description":"Delete an access list. The access list cannot be deleted if it is currently assigned to any group or API key. Requires an API key with write manage permissions.","parameters":[{"name":"access_list_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The access list ID","example":"123e4567-e89b-12d3-a456-426614174000"}],"responses":{"200":{"description":"Access list deleted successfully"},"400":{"description":"Bad request - invalid access list ID.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"401":{"description":"Unauthorized - missing or invalid Authorization header.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"403":{"description":"Forbidden - API key does not have write manage permissions.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"404":{"description":"Not found - access list does not exist.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"409":{"description":"Conflict - access list is currently in use and cannot be deleted.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}}},"operationId":"deleteAccessList"}},"\/v1\/manage\/org\/group\/access-list":{"servers":[{"url":"https:\/\/api-v2.requesty.ai","description":"Management API endpoint"}],"post":{"summary":"Set default group access list","description":"Set or clear the organization's default access list for groups. When set, any group that does not have its own explicit access list will use this one. Pass `null` for `access_list_id` to clear the default. Requires an API key with write manage permissions.","requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/SetGroupDefaultAccessListRequest"}}}},"responses":{"200":{"description":"Default group access list updated successfully"},"400":{"description":"Bad request - invalid access list ID.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"401":{"description":"Unauthorized - missing or invalid Authorization header.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"403":{"description":"Forbidden - API key does not have write manage permissions.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"404":{"description":"Not found - the specified access list does not exist.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}}},"operationId":"setDefaultGroupAccessList"}},"\/v1\/manage\/group\/{group_id}\/access-list\/{access_list_id}":{"servers":[{"url":"https:\/\/api-v2.requesty.ai","description":"Management API endpoint"}],"put":{"summary":"Attach access list to group","description":"Attach an access list to a group. Every API key in the group inherits the list, unless the key has its own access list. Requires an API key with write manage permissions.","parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The group ID","example":"123e4567-e89b-12d3-a456-426614174000"},{"name":"access_list_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The access list ID","example":"7c9e6679-7425-40de-944b-e07fc1f90ae7"}],"responses":{"200":{"description":"Access list attached to the group successfully"},"400":{"description":"Bad request - invalid group ID or access list ID.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"401":{"description":"Unauthorized - missing or invalid Authorization header.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"403":{"description":"Forbidden - API key does not have write manage permissions.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"404":{"description":"Not found - the group or access list does not exist in your organization.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"409":{"description":"Conflict - the access list is already attached to this group.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}}},"operationId":"attachGroupAccessList"},"delete":{"summary":"Detach access list from group","description":"Detach an access list from a group. API keys in the group fall back to the group default access list, then the organization approved models. Succeeds even if the access list is not attached to the group. Requires an API key with write manage permissions.","parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The group ID","example":"123e4567-e89b-12d3-a456-426614174000"},{"name":"access_list_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The access list ID","example":"7c9e6679-7425-40de-944b-e07fc1f90ae7"}],"responses":{"200":{"description":"Access list detached from the group successfully"},"400":{"description":"Bad request - invalid group ID or access list ID.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"401":{"description":"Unauthorized - missing or invalid Authorization header.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"403":{"description":"Forbidden - API key does not have write manage permissions.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}}},"operationId":"detachGroupAccessList"}},"\/v1\/manage\/org\/approved-model":{"servers":[{"url":"https:\/\/api-v2.requesty.ai","description":"Management API endpoint"}],"get":{"summary":"Get org approved models","description":"Retrieve your organization's approved models, the organization-wide allowlist every request is checked against unless a narrower access list applies. Models are returned as `provider\/model` names, grouped by modality. When every modality is empty, the organization has no approved models configured and every model in the catalog is allowed. Requires an API key with read manage permissions.","responses":{"200":{"description":"Successfully retrieved approved models","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/OrgApprovedModelsResponse"}}}},"401":{"description":"Unauthorized - missing or invalid Authorization header.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"403":{"description":"Forbidden - API key does not have read manage permissions.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"404":{"description":"Not found - organization does not exist.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}}},"operationId":"getOrgApprovedModels"},"post":{"summary":"Set org approved models","description":"Replace your organization's approved models. Each modality you send replaces that modality's list, and any modality you omit is cleared, so send every modality you want to keep. Entries can be `provider\/model` names or model IDs. Every model used by one of your access lists must stay approved, otherwise the request fails with 400. Send every modality empty to remove the allowlist and allow every model in the catalog. Requires an API key with write manage permissions.","requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/SetOrgApprovedModelsRequest"}}}},"responses":{"200":{"description":"Approved models updated successfully"},"400":{"description":"Bad request - unknown model, or a model used by an access list would no longer be approved.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"401":{"description":"Unauthorized - missing or invalid Authorization header.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"403":{"description":"Forbidden - API key does not have write manage permissions.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"404":{"description":"Not found - organization does not exist.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}}},"operationId":"setOrgApprovedModels"}},"\/v1\/manage\/policy":{"servers":[{"url":"https:\/\/api-v2.requesty.ai","description":"Management API endpoint"}],"get":{"summary":"List policies","description":"List the organization's routing policies. Returns every organization-scoped policy with its ID, name, and configuration; policy names are returned without the `policy\/` prefix. Requires an API key with read manage permissions.","responses":{"200":{"description":"Successfully retrieved policies","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ListPoliciesResponse"}}}},"401":{"description":"Unauthorized - missing or invalid Authorization header.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"403":{"description":"Forbidden - API key does not have read manage permissions.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}}},"operationId":"listPolicies"},"post":{"summary":"Create policy","description":"Create a routing policy in the organization. A policy is a named chain of models with a strategy: `fallback`, `load_balance`, `latency`, or `best_balance`. Use the policy name as the `model` in inference requests to route through it. Requires an API key with write manage permissions.","requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/CreatePolicyRequest"}}}},"responses":{"200":{"description":"Policy created successfully","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/PolicyResponse"}}}},"400":{"description":"Bad request - missing name, unsupported scope, or invalid policy configuration.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"401":{"description":"Unauthorized - missing or invalid Authorization header.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"403":{"description":"Forbidden - API key does not have write manage permissions.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}}},"operationId":"createPolicy"}},"\/v1\/manage\/policy\/{policy_id}":{"servers":[{"url":"https:\/\/api-v2.requesty.ai","description":"Management API endpoint"}],"patch":{"summary":"Update policy","description":"Replace a policy's name and configuration. Both `name` and `config` are required; the configuration you send replaces the existing one in full. Changes apply to new inference requests immediately. Requires an API key with write manage permissions.","parameters":[{"name":"policy_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The policy ID","example":"123e4567-e89b-12d3-a456-426614174000"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/UpdatePolicyRequest"}}}},"responses":{"200":{"description":"Policy updated successfully","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/PolicyResponse"}}}},"400":{"description":"Bad request - invalid policy ID, missing name or config, unsupported scope, or invalid policy configuration.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"401":{"description":"Unauthorized - missing or invalid Authorization header.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"403":{"description":"Forbidden - API key does not have write manage permissions.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"404":{"description":"Not found - policy does not exist in the organization.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}}},"operationId":"updatePolicy"},"delete":{"summary":"Delete policy","description":"Delete a routing policy from the organization. Inference requests that reference the deleted policy name fail after deletion. Requires an API key with write manage permissions.","parameters":[{"name":"policy_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The policy ID","example":"123e4567-e89b-12d3-a456-426614174000"}],"responses":{"200":{"description":"Policy deleted successfully"},"400":{"description":"Bad request - invalid policy ID.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"401":{"description":"Unauthorized - missing or invalid Authorization header.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"403":{"description":"Forbidden - API key does not have write manage permissions.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"404":{"description":"Not found - policy does not exist in the organization.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorResponse"}}}}},"operationId":"deletePolicy"}}},"components":{"schemas":{"AnthropicContentBlock":{"oneOf":[{"$ref":"#\/components\/schemas\/AnthropicTextBlock"},{"$ref":"#\/components\/schemas\/AnthropicImageBlock"},{"$ref":"#\/components\/schemas\/AnthropicToolUseBlock"},{"$ref":"#\/components\/schemas\/AnthropicToolResultBlock"}]},"AnthropicImageBlock":{"type":"object","required":["type","source"],"properties":{"type":{"type":"string","enum":["image"]},"source":{"$ref":"#\/components\/schemas\/AnthropicImageSource"}}},"AnthropicImageSource":{"type":"object","required":["type","media_type","data"],"properties":{"type":{"type":"string","enum":["base64"]},"media_type":{"type":"string","enum":["image\/jpeg","image\/png","image\/gif","image\/webp"]},"data":{"type":"string","description":"Base64 encoded image data"}}},"AnthropicMessage":{"type":"object","required":["role","content"],"properties":{"role":{"type":"string","enum":["user","assistant"],"description":"The role of the messages author"},"content":{"oneOf":[{"type":"string"},{"type":"array","items":{"$ref":"#\/components\/schemas\/AnthropicContentBlock"}}],"description":"The contents of the message"}}},"AnthropicTextBlock":{"type":"object","required":["type","text"],"properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"}}},"AnthropicTool":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["custom","web_search_20250305"],"description":"The type of tool. Use `custom` (default, may be omitted) for user-defined tools with `name`, `description`, and `input_schema`. Use `web_search_20250305` to enable native Anthropic web search.","default":"custom"},"name":{"type":"string","description":"The tool name. Required for `custom` tools. For `web_search_20250305`, set to `web_search`."},"description":{"type":"string","description":"For `custom` tools: describes when the model should use this tool."},"input_schema":{"type":"object","description":"For `custom` tools: JSON schema for the tool input."},"max_uses":{"type":"integer","description":"For `web_search_20250305`: maximum number of web searches the model may perform.","minimum":1}}},"AnthropicToolChoice":{"type":"object","required":["type","name"],"properties":{"type":{"type":"string","enum":["tool"]},"name":{"type":"string"}}},"AnthropicToolResultBlock":{"type":"object","required":["type","tool_use_id"],"properties":{"type":{"type":"string","enum":["tool_result"]},"tool_use_id":{"type":"string"},"content":{"oneOf":[{"type":"string"},{"type":"array","items":{"$ref":"#\/components\/schemas\/AnthropicContentBlock"}}]},"is_error":{"type":"boolean"}}},"AnthropicToolUseBlock":{"type":"object","required":["type","id","name","input"],"properties":{"type":{"type":"string","enum":["tool_use"]},"id":{"type":"string"},"name":{"type":"string"},"input":{"type":"object"}}},"AnthropicUsage":{"type":"object","required":["input_tokens","output_tokens"],"properties":{"input_tokens":{"type":"integer","description":"The number of input tokens which were used"},"output_tokens":{"type":"integer","description":"The number of output tokens which were used"}}},"ChatCompletionRequest":{"type":"object","required":["messages"],"properties":{"model":{"type":"string","description":"The model name. If omitted, defaults to openai\/gpt-4o-mini.","default":"openai\/gpt-4o-mini","example":"openai\/gpt-4o-mini"},"messages":{"type":"array","items":{"$ref":"#\/components\/schemas\/Message"},"description":"An array of message objects with role and content"},"max_tokens":{"type":"integer","description":"Maximum number of tokens to generate"},"temperature":{"type":"number","description":"Controls randomness of the output"},"top_p":{"type":"number","description":"Controls diversity of the output"},"stream":{"type":"boolean","description":"Enable Server-Sent Events (SSE) streaming responses"},"tools":{"type":"array","items":{"$ref":"#\/components\/schemas\/Tool"},"description":"Available tools for the model. Supports `function` tools for custom function calling and `web_search` for real-time web search."},"tool_choice":{"type":"string","description":"Specifies how tool calling should be handled"},"response_format":{"type":"object","description":"For structured responses (some models only). Supports `{\"type\": \"text\"}`, `{\"type\": \"json_object\"}`, `{\"type\": \"json_schema\", \"json_schema\": {...}}` and, for Typesafe Jev decision models only, `{\"type\": \"questions\", \"questions\": {...}}` (experimental)."}}},"ChatCompletionResponse":{"type":"object","required":["id","object","created","model","choices"],"properties":{"id":{"type":"string","description":"Unique identifier for the completion"},"object":{"type":"string","description":"Object type"},"created":{"type":"integer","description":"Timestamp of creation"},"model":{"type":"string","description":"Model used for completion"},"usage":{"$ref":"#\/components\/schemas\/Usage"},"choices":{"type":"array","items":{"$ref":"#\/components\/schemas\/Choice"}}}},"Choice":{"type":"object","properties":{"index":{"type":"integer"},"message":{"$ref":"#\/components\/schemas\/Message"},"finish_reason":{"type":"string"}}},"CompletionTokenDetails":{"type":"object","properties":{"reasoning_tokens":{"type":"integer","format":"int32","description":"Tokens generated for reasoning."}}},"EmbeddingData":{"type":"object","required":["embedding","index","object"],"properties":{"embedding":{"oneOf":[{"type":"array","items":{"type":"number","format":"float"},"description":"The embedding vector as an array of floats"},{"type":"string","description":"The embedding vector as a base64-encoded string"}],"description":"The embedding vector, the format of which is determined by the encoding_format parameter"},"index":{"type":"integer","format":"int64","description":"The index of the embedding in the list"},"object":{"type":"string","description":"The object type, which is always 'embedding'"}}},"EmbeddingRequest":{"type":"object","required":["input","model"],"properties":{"input":{"oneOf":[{"type":"string","description":"A single text string to embed"},{"type":"array","items":{"type":"string"},"description":"An array of text strings to embed"},{"type":"array","items":{"type":"integer","format":"int64"},"description":"An array of token integers to embed"},{"type":"array","items":{"type":"array","items":{"type":"integer","format":"int64"}},"description":"An array of token arrays to embed"}],"description":"Input text to embed, encoded as a string, array of strings, array of tokens, or array of token arrays"},"model":{"type":"string","description":"The model name to use for embedding generation","example":"openai\/text-embedding-3-small"},"dimensions":{"type":"integer","format":"int64","description":"The number of dimensions the resulting output embeddings should have"},"encoding_format":{"type":"string","enum":["float","base64"],"description":"The format to return the embeddings in. Can be either float or base64.","default":"float"},"user":{"type":"string","description":"A unique identifier representing your end-user."}}},"EmbeddingResponse":{"type":"object","required":["data","model","object","usage"],"properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/EmbeddingData"},"description":"The list of embeddings generated by the model"},"model":{"type":"string","description":"The name of the model used to generate the embedding"},"object":{"type":"string","description":"The object type, which is always 'list'"},"usage":{"$ref":"#\/components\/schemas\/EmbeddingUsage"}}},"EmbeddingUsage":{"type":"object","required":["prompt_tokens","total_tokens"],"properties":{"prompt_tokens":{"type":"integer","format":"int64","description":"The number of tokens used by the prompt"},"total_tokens":{"type":"integer","format":"int64","description":"The total number of tokens used by the request"}}},"Function":{"type":"object","required":["name","description","parameters"],"properties":{"name":{"type":"string","description":"The name of the function"},"description":{"type":"string","description":"The description of the function"},"parameters":{"type":"object","description":"The parameters schema for the function"}}},"ImageData":{"type":"object","properties":{"url":{"type":"string","description":"The URL of the generated image (when response_format is url)"},"b64_json":{"type":"string","description":"The base64-encoded JSON of the generated image (when response_format is b64_json)"}}},"ImageEditMultipartRequest":{"type":"object","required":["prompt","model","image[]"],"properties":{"model":{"type":"string","description":"The model to use for image editing","example":"openai\/gpt-image-2"},"prompt":{"type":"string","description":"A text description of the desired edit"},"image[]":{"type":"array","description":"One or more image files to edit. Repeat the image[] field to upload multiple images (up to 16 for GPT image models).","items":{"type":"string","format":"binary"}},"size":{"type":"string","description":"Output size. Defaults to auto.","enum":["auto","1024x1024","1536x1024","1024x1536"]},"quality":{"type":"string","description":"Image quality. Defaults to auto.","enum":["auto","high","medium","low"]},"mask":{"type":"string","format":"binary","description":"Optional mask image file. Transparent pixels mark the area that will be regenerated."},"stream":{"type":"boolean","description":"When true, the response is a server-sent event stream of partial_image events followed by an image_edit.completed event."},"partial_images":{"type":"integer","minimum":0,"maximum":3,"description":"Number of low-resolution partial images (0 to 3) to emit before the final image when stream is true."}}},"ImageEditRequest":{"type":"object","required":["prompt","model","image"],"properties":{"model":{"type":"string","description":"The model to use for image editing","example":"openai\/gpt-image-2"},"prompt":{"type":"string","description":"A text description of the desired edit","example":"Make the sky a dramatic sunset"},"image":{"type":"array","description":"The list of input image references to edit. Up to 16 images for GPT image models.","items":{"$ref":"#\/components\/schemas\/ImageReference"}},"size":{"type":"string","description":"The size of the edited images. Defaults to auto.","enum":["auto","1024x1024","1536x1024","1024x1536"],"default":"auto","example":"1024x1024"},"quality":{"type":"string","description":"The quality of the edited image. Defaults to auto.","enum":["auto","high","medium","low"],"default":"auto"},"mask":{"description":"Optional mask image. Transparent pixels in the mask mark the area that will be regenerated.","$ref":"#\/components\/schemas\/ImageReference"},"stream":{"type":"boolean","default":false,"description":"When true, the response is a server-sent event stream of partial_image events followed by a completed event carrying the final b64_json and usage. Supported on OpenAI GPT Image models (including Azure deployments); other image models return the standard JSON response.","example":false},"partial_images":{"type":"integer","minimum":0,"maximum":3,"default":0,"description":"Number of low-resolution partial images (0 to 3) to emit before the final image when stream is true.","example":2}}},"ImageGenerationRequest":{"type":"object","required":["prompt","model"],"properties":{"model":{"type":"string","description":"The model to use for image generation","example":"azure\/openai\/gpt-image-1"},"prompt":{"type":"string","description":"A text description of the desired image","example":"A watercolor painting of a Japanese garden in autumn"},"n":{"type":"integer","description":"The number of images to generate","default":1,"minimum":1,"example":1},"size":{"type":"string","description":"The size of the generated images","enum":["1024x1024","1536x1024","1024x1536"],"default":"1024x1024","example":"1024x1024"},"quality":{"type":"string","description":"The quality of the generated image","enum":["auto","high","medium","low"],"default":"auto","example":"auto"},"response_format":{"type":"string","description":"The format in which the generated images are returned","enum":["url","b64_json"],"default":"url","example":"url"},"background":{"type":"string","description":"The background type for the generated image","enum":["auto","transparent","opaque"],"default":"auto","example":"auto"},"output_format":{"type":"string","description":"The file format of the generated image","enum":["png","jpeg","webp"],"default":"png","example":"png"},"stream":{"type":"boolean","default":false,"description":"When true, the response is a server-sent event stream of partial_image events followed by a completed event carrying the final b64_json and usage. Supported on OpenAI GPT Image models (including Azure deployments); other image models return the standard JSON response.","example":false},"partial_images":{"type":"integer","minimum":0,"maximum":3,"default":0,"description":"Number of low-resolution partial images (0 to 3) to emit before the final image when stream is true.","example":2}}},"ImageGenerationResponse":{"type":"object","required":["created","data"],"properties":{"created":{"type":"integer","description":"The Unix timestamp of when the image was created","example":1719000000},"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/ImageData"},"description":"The list of generated images"}}},"ImageReference":{"type":"object","description":"A reference to an input image. Set image_url to a base64 data URL (for example data:image\/png;base64,iVBORw0KGgo...). Remote http(s) URLs are not downloaded by the router and are rejected.","properties":{"file_id":{"type":"string","description":"The File API ID of an uploaded image. Accepted for OpenAI compatibility but not forwarded to providers; use image_url instead."},"image_url":{"type":"string","description":"A base64 encoded data URL for the input image (data:image\/png;base64,...). Remote http(s) URLs are not supported.","example":"data:image\/png;base64,iVBORw0KGgo..."}}},"Message":{"type":"object","required":["role","content"],"properties":{"role":{"type":"string","enum":["user","assistant","system","tool"],"description":"The role of the message sender"},"content":{"type":"string","description":"The content of the message"},"name":{"type":"string","description":"The name of the tool (for tool messages)"}}},"MessageRequest":{"type":"object","required":["model","max_tokens","messages"],"properties":{"model":{"type":"string","description":"The model to use for the completion","default":"anthropic\/claude-sonnet-5-5","example":"anthropic\/claude-sonnet-5-5"},"max_tokens":{"type":"integer","description":"The maximum number of tokens to generate before stopping","minimum":1,"example":1024},"messages":{"type":"array","items":{"$ref":"#\/components\/schemas\/AnthropicMessage"},"description":"Input messages"},"system":{"type":"string","description":"System prompt to be used for the completion"},"temperature":{"type":"number","minimum":0,"maximum":2,"description":"Amount of randomness injected into the response"},"top_p":{"type":"number","minimum":0,"maximum":1,"description":"Use nucleus sampling"},"top_k":{"type":"integer","minimum":0,"description":"Only sample from the top K options for each subsequent token"},"stream":{"type":"boolean","description":"Whether to incrementally stream the response using server-sent events"},"stop_sequences":{"type":"array","items":{"type":"string"},"description":"Custom text sequences that will cause the model to stop generating"},"tools":{"type":"array","items":{"$ref":"#\/components\/schemas\/AnthropicTool"},"description":"Definitions of tools that the model may use"},"tool_choice":{"oneOf":[{"type":"string","enum":["auto","any"]},{"$ref":"#\/components\/schemas\/AnthropicToolChoice"}],"description":"How the model should use the provided tools"},"output_config":{"type":"object","description":"Output configuration for the response.","properties":{"format":{"type":"object","description":"Constrain the response to a JSON Schema. Requesty maps this to the structured output mode of the target model, so it works with any model that supports `json_schema` response formats.","required":["type","schema"],"properties":{"type":{"type":"string","enum":["json_schema"],"description":"Must be `json_schema`."},"schema":{"type":"object","description":"The JSON Schema the response must conform to.","example":{"type":"object","properties":{"city":{"type":"string"},"temperature_c":{"type":"number"}},"required":["city","temperature_c"],"additionalProperties":false}}}}}}}},"MessageResponse":{"type":"object","required":["id","type","role","content","model","stop_reason","usage"],"properties":{"id":{"type":"string","description":"Unique object identifier"},"type":{"type":"string","enum":["message"],"description":"Object type"},"role":{"type":"string","enum":["assistant"],"description":"Conversational role of the generated message"},"content":{"type":"array","items":{"$ref":"#\/components\/schemas\/AnthropicContentBlock"},"description":"Content generated by the model"},"model":{"type":"string","description":"The model that handled the request"},"stop_reason":{"type":"string","enum":["end_turn","max_tokens","stop_sequence","tool_use"],"description":"The reason that we stopped"},"stop_sequence":{"type":"string","description":"Which custom stop sequence was generated"},"usage":{"$ref":"#\/components\/schemas\/AnthropicUsage"}}},"PricingBand":{"type":"object","properties":{"prompt_tokens_threshold":{"type":"integer","description":"Prompt token count from which this band applies"},"input_price":{"type":"number","format":"float","description":"Price per input token in USD"},"caching_price":{"type":"number","format":"float","description":"Price per token for writing to the cache in USD"},"caching_5m_price":{"type":"number","format":"float","description":"Price per token for a 5 minute cache write in USD"},"caching_1h_price":{"type":"number","format":"float","description":"Price per token for a 1 hour cache write in USD"},"cached_price":{"type":"number","format":"float","description":"Price per cached input token in USD"},"output_price":{"type":"number","format":"float","description":"Price per output token in USD"},"pricing_scheme":{"type":"string","description":"Pricing scheme hint for this band"}}},"Model":{"type":"object","properties":{"api":{"type":"string","description":"The modality of the model, e.g. 'chat'"},"id":{"type":"string","description":"The model identifier (e.g., 'openai\/gpt-5-mini')"},"object":{"type":"string","enum":["model"],"description":"The object type, always 'model'"},"created":{"type":"integer","description":"The Unix timestamp (in seconds) when the model was created"},"updated":{"type":"integer","description":"The Unix timestamp (in seconds) when the model was last updated"},"owned_by":{"type":"string","description":"The system or organization that owns the model","example":"system"},"input_price":{"type":"number","format":"float","description":"Price per input token in USD"},"caching_price":{"type":"number","format":"float","description":"Price per token for caching in USD"},"cached_price":{"type":"number","format":"float","description":"Price per cached token in USD"},"output_price":{"type":"number","format":"float","description":"Price per output token in USD"},"pricing_scheme":{"type":"string","description":"Pricing scheme hint when the model is not priced per token"},"pricing":{"type":"array","description":"Pricing bands, ordered by prompt token threshold. A band applies once the prompt exceeds its `prompt_tokens_threshold`.","items":{"$ref":"#\/components\/schemas\/PricingBand"}},"max_output_tokens":{"type":"integer","description":"Maximum number of output tokens the model can generate"},"context_window":{"type":"integer","description":"Maximum context window size in tokens"},"supports_caching":{"type":"boolean","description":"Whether the model supports caching"},"supports_vision":{"type":"boolean","description":"Whether the model accepts image inputs. `true` when `supports_vision_inline` or `supports_vision_url` is `true`."},"supports_vision_inline":{"type":"boolean","description":"Whether the model accepts images sent inline as base64 data URLs (`data:image\/png;base64,...`). Requests with an inline image to a model where this is `false` return `400`.","example":true},"supports_vision_url":{"type":"boolean","description":"Whether the model accepts images referenced by an `http:\/\/` or `https:\/\/` URL. Requests with an image URL to a model where this is `false` return `400`; send the image as a base64 data URL instead.","example":true},"supports_computer_use":{"type":"boolean","description":"Whether the model supports computer use capabilities"},"supports_reasoning":{"type":"boolean","description":"Whether the model supports reasoning capabilities"},"reasoning":{"type":"object","description":"Reasoning effort levels the model accepts. Omitted for non reasoning models and for models whose supported levels are not known yet.","properties":{"supported_efforts":{"type":"array","items":{"type":"string","enum":["none","min","low","medium","high","xhigh","max"]},"description":"Effort values the model accepts, lowest first. Other values are mapped to the closest supported level."}},"required":["supported_efforts"]},"supports_image_generation":{"type":"boolean","description":"Whether the model can generate images"},"supports_tool_calling":{"type":"boolean","description":"Whether the model supports tool\/function calling"},"supports_role_developer":{"type":"boolean","description":"Whether the model supports the `developer` message role"},"supports_web_search":{"type":"boolean","description":"Whether the model supports web search via the `web_search` tool type"},"supports_output_json_object":{"type":"boolean","description":"Whether the model supports `response_format` with `{ \"type\": \"json_object\" }`"},"supports_output_json_schema":{"type":"boolean","description":"Whether the model supports strict structured outputs via `response_format` with `{ \"type\": \"json_schema\" }`"},"supports_system_mid_conversation":{"type":"boolean","description":"Whether the model accepts `system` messages after the first user or assistant message, not only at the start of the conversation"},"description":{"type":"string","description":"A description of the model's capabilities and use cases"},"data_retention":{"type":"boolean","description":"Whether the provider retains request data"},"data_retention_days":{"type":"integer","description":"Number of days the provider retains request data"},"data_used_for_training":{"type":"boolean","description":"Whether the provider may use request data for training"},"privacy_comments":{"type":"string","description":"Additional privacy notes for the model"},"geolocation":{"type":"string","description":"Region the model is served from, e.g. 'us' or 'eu'"},"quantization":{"type":"string","description":"Quantization the provider serves the model in, e.g. 'fp8' or 'fp4'. Omitted when the provider does not disclose it or the model is served at full precision."},"hugging_face_id":{"type":"string","description":"Hugging Face repository id of the open-weights model being served (e.g. 'XiaomiMiMo\/MiMo-V2.6-Flash-RL'); its page is https:\/\/huggingface.co\/{hugging_face_id}. Omitted for models that are not on Hugging Face."},"retires":{"type":"integer","format":"int64","description":"Unix timestamp (in seconds) when the model is scheduled to be retired. After this date, requests to the model fail. Omitted if no retirement is scheduled."},"open_weights":{"type":"boolean","description":"Whether the model's weights are openly available"},"model_lab":{"type":"string","description":"The lab that trained the model"},"model_canonical_name":{"type":"string","description":"The canonical name of the underlying model, shared across the providers that serve it"}}},"ModelsResponse":{"type":"object","required":["object","data"],"properties":{"object":{"type":"string","enum":["list"],"description":"The object type, always 'list'"},"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/Model"},"description":"The list of available models"}}},"PromptTokenDetails":{"type":"object","properties":{"cached_tokens":{"type":"integer","format":"int32","description":"Cached tokens present in the prompt."},"caching_tokens":{"type":"integer","format":"int32","description":"Tokens that were cached following this prompt."}}},"ResponsesInputContent":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["input_text","input_image","input_file"]},"text":{"type":"string","description":"For `type=input_text`: the text content."},"image_url":{"type":"string","description":"For `type=input_image`: an https:\/\/ URL or `data:` URL."},"detail":{"type":"string","enum":["low","high","auto"],"description":"For `type=input_image`: image fidelity."},"filename":{"type":"string","description":"For `type=input_file`: name of the file."},"file_data":{"type":"string","description":"For `type=input_file`: base64 data URL, e.g. `data:application\/pdf;base64,...`."},"file_url":{"type":"string","description":"For `type=input_file`: remote URL of the file."},"mime_type":{"type":"string","description":"For `type=input_file`: optional MIME type override."}}},"ResponsesInputItem":{"type":"object","description":"Typed input item. Use `type=message` for chat turns, `function_call` to replay a tool call, and `function_call_output` to provide a tool result.","properties":{"type":{"type":"string","enum":["message","reasoning","function_call","function_call_output"]},"role":{"type":"string","enum":["user","assistant","system","developer"],"description":"For `type=message`: the role of the message author."},"content":{"oneOf":[{"type":"string"},{"type":"array","items":{"$ref":"#\/components\/schemas\/ResponsesInputContent"}}],"description":"For `type=message`: a string or an array of typed content objects."},"name":{"type":"string","description":"For `type=function_call`: the function name."},"arguments":{"type":"string","description":"For `type=function_call`: JSON-encoded arguments string."},"call_id":{"type":"string","description":"For `type=function_call` and `function_call_output`: identifier linking call and result."},"output":{"type":"string","description":"For `type=function_call_output`: the result returned to the model."}}},"ResponsesOutputContent":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["output_text","output_refusal"]},"text":{"type":"string","description":"For `type=output_text`: the generated text."},"refusal":{"type":"string","description":"For `type=output_refusal`: the refusal message."}}},"ResponsesOutputItem":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["message","reasoning","function_call","web_search_call"]},"id":{"type":"string"},"status":{"type":"string","enum":["in_progress","completed"]},"role":{"type":"string","enum":["assistant"],"description":"For `type=message`."},"content":{"type":"array","items":{"$ref":"#\/components\/schemas\/ResponsesOutputContent"},"description":"For `type=message`: model-generated content blocks."},"summary":{"type":"array","description":"For `type=reasoning`: optional summary of the reasoning trace."},"encrypted_content":{"type":"string","description":"For `type=reasoning`: opaque token that can be replayed on subsequent turns."},"name":{"type":"string","description":"For `type=function_call`: the function name."},"arguments":{"type":"string","description":"For `type=function_call`: JSON-encoded arguments string."},"call_id":{"type":"string","description":"For `type=function_call`: identifier to pair with a `function_call_output`."}}},"ResponsesReasoning":{"type":"object","description":"Reasoning configuration for reasoning-capable models.","properties":{"effort":{"type":"string","enum":["low","medium","high"],"description":"How much effort the model should spend on reasoning. Defaults to medium."},"summary":{"type":"string","enum":["auto","concise","detailed"],"description":"Whether and how to summarize the reasoning trace."}}},"ResponsesRequest":{"type":"object","required":["model","input"],"properties":{"model":{"type":"string","description":"The model to use for the response. To route OpenAI models through their native Responses API, use the `openai-responses\/` prefix (e.g. `openai-responses\/gpt-5`).","default":"openai-responses\/gpt-5","example":"openai-responses\/gpt-5"},"input":{"description":"Text, image, or file inputs to the model. Either a plain string or an array of typed input items.","oneOf":[{"type":"string","example":"Tell me a three sentence bedtime story about a unicorn."},{"type":"array","items":{"$ref":"#\/components\/schemas\/ResponsesInputItem"}}]},"instructions":{"type":"string","description":"Inserts a system (or developer) message as the first item in the model's context."},"max_output_tokens":{"type":"integer","minimum":1,"description":"Upper bound for the number of tokens that can be generated, including visible output tokens and reasoning tokens."},"stream":{"type":"boolean","description":"If true, the response is streamed to the client as it is generated using server-sent events."},"temperature":{"type":"number","minimum":0,"maximum":2,"description":"Sampling temperature between 0 and 2. Higher values produce more random output."},"top_p":{"type":"number","minimum":0,"maximum":1,"description":"Nucleus sampling: consider tokens with cumulative probability mass up to top_p."},"parallel_tool_calls":{"type":"boolean","description":"Whether to allow the model to run tool calls in parallel."},"tool_choice":{"oneOf":[{"type":"string","enum":["auto","none","required"]},{"type":"object"}],"description":"Controls which (if any) tool is called by the model."},"tools":{"type":"array","items":{"$ref":"#\/components\/schemas\/ResponsesTool"},"description":"Tools the model may call."},"reasoning":{"$ref":"#\/components\/schemas\/ResponsesReasoning"},"text":{"$ref":"#\/components\/schemas\/ResponsesText"},"include":{"type":"array","items":{"type":"string"},"description":"Specify additional output data to include in the model response."},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Set of key-value pairs that can be attached to the request."},"store":{"type":"boolean","description":"Whether to store the generated model response for later retrieval via API."},"truncation":{"type":"string","description":"The truncation strategy to use for the model response."},"user":{"type":"string","description":"A unique identifier representing your end-user."}}},"ResponsesResponse":{"type":"object","required":["id","object","created_at","model","status","output"],"properties":{"id":{"type":"string","description":"Unique identifier for this response."},"object":{"type":"string","enum":["response"],"description":"Object type."},"created_at":{"type":"integer","description":"Unix timestamp (in seconds) of when the response was created."},"model":{"type":"string","description":"Model ID used to generate the response."},"status":{"type":"string","enum":["completed","failed","in_progress","incomplete"],"description":"Status of the response generation."},"output":{"type":"array","items":{"$ref":"#\/components\/schemas\/ResponsesOutputItem"},"description":"Output items from the model. Typically one or more `message`, `function_call`, or `reasoning` items."},"incomplete_details":{"type":"object","properties":{"reason":{"type":"string","description":"Why the response is incomplete."}}},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}},"usage":{"$ref":"#\/components\/schemas\/ResponsesUsage"}}},"ResponsesText":{"type":"object","description":"Output text configuration, including structured output format.","properties":{"format":{"type":"object","description":"Configure the format that the model must output. Set `{ \"type\": \"json_schema\" }` for strict structured outputs, or `{ \"type\": \"text\" }` (default) for plain text.","properties":{"type":{"type":"string","enum":["text","json_object","json_schema"]},"name":{"type":"string","description":"For `type=json_schema`: schema name."},"strict":{"type":"boolean","description":"For `type=json_schema`: enforce strict schema validation."},"schema":{"type":"object","description":"For `type=json_schema`: the JSON Schema document."}}}}},"ResponsesTool":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["function","web_search"]},"name":{"type":"string","description":"For `type=function`: the function name."},"description":{"type":"string","description":"For `type=function`: a description of when to call the function."},"parameters":{"type":"object","description":"For `type=function`: JSON Schema describing the arguments."},"strict":{"type":"boolean","description":"For `type=function`: when true, the model must produce arguments that exactly match the schema."}}},"ResponsesUsage":{"type":"object","required":["input_tokens","output_tokens","total_tokens"],"properties":{"input_tokens":{"type":"integer"},"output_tokens":{"type":"integer"},"total_tokens":{"type":"integer"},"input_tokens_details":{"type":"object","properties":{"cached_tokens":{"type":"integer"}}},"output_tokens_details":{"type":"object","properties":{"reasoning_tokens":{"type":"integer"}}},"cost":{"type":"number","format":"float","description":"Requesty's USD cost for this request. Returned by default on non-streaming responses. For streaming, the final `response.completed` event includes `usage` with `cost`."}}},"SpeechRequest":{"type":"object","required":["model","input","voice"],"properties":{"model":{"type":"string","description":"The text-to-speech model to use, prefixed with the provider slug. Currently only OpenAI models are supported.","example":"openai\/gpt-4o-mini-tts"},"input":{"type":"string","description":"The text to synthesize into speech. Maximum length is 4096 characters.","maxLength":4096,"example":"The quick brown fox jumped over the lazy dog."},"voice":{"type":"string","description":"The voice to use when generating the audio.","enum":["alloy","ash","ballad","coral","echo","fable","onyx","nova","sage","shimmer","verse"],"example":"alloy"},"instructions":{"type":"string","description":"Additional steering for the voice (tone, accent, pacing). Supported by `openai\/gpt-4o-mini-tts` only. Ignored by `openai\/tts-1` and `openai\/tts-1-hd`.","example":"Speak in a warm, friendly tone."},"response_format":{"type":"string","description":"The audio container format for the synthesized output.","enum":["mp3","opus","aac","flac","wav","pcm"],"default":"mp3","example":"mp3"},"speed":{"type":"number","format":"float","description":"Playback speed of the generated audio. `1.0` is normal speed.","minimum":0.25,"maximum":4,"default":1,"example":1},"stream_format":{"type":"string","description":"Optional and not recommended for most clients. Omit this field to get the default response shape: raw audio bytes in the requested `response_format`. Set to `sse` only with `openai\/gpt-4o-mini-tts` to receive a Server-Sent Events stream of `speech.audio.delta` and `speech.audio.done` events with base64-encoded audio chunks. The router rejects `sse` with `openai\/tts-1` or `openai\/tts-1-hd`, and rejects `audio` with `openai\/gpt-4o-mini-tts`."}}},"Tool":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["function","web_search"],"description":"The type of tool. Use `function` for custom function calling, or `web_search` to enable the model to search the web for real-time information. When `type=web_search`, Requesty translates the tool to the provider's native web search format (Anthropic, Vertex\/Gemini, OpenAI, xAI, Perplexity)."},"function":{"$ref":"#\/components\/schemas\/Function","description":"Required when `type=function`. The function definition."}}},"TranscriptionDurationUsage":{"type":"object","required":["type","seconds"],"properties":{"type":{"type":"string","enum":["duration"],"description":"Discriminator. Always `duration` for this variant.","example":"duration"},"seconds":{"type":"number","format":"float","description":"Duration of the input audio in seconds."}}},"TranscriptionMultipartRequest":{"type":"object","required":["file","model"],"properties":{"file":{"type":"string","format":"binary","description":"The audio file to transcribe. Supported formats are `flac`, `mp3`, `mp4`, `mpeg`, `mpga`, `m4a`, `ogg`, `wav`, and `webm`. Maximum upload size is 32 MB."},"model":{"type":"string","description":"The speech-to-text model to use, prefixed with the provider slug.","example":"openai\/gpt-4o-transcribe"},"language":{"type":"string","description":"The language of the input audio in ISO 639-1 format (for example, `en`, `fr`, `ja`). Supplying the language improves accuracy and latency. Auto-detected when omitted."},"context_bias[]":{"type":"string","description":"A word or phrase expected in the audio, such as a name or product term, that steers the transcription toward the spelling you give. Repeat the `context_bias[]` field once per entry. Supported for Mistral models; other models ignore it.","example":"Katelynn"}}},"TranscriptionResponse":{"type":"object","required":["text","usage"],"properties":{"text":{"type":"string","description":"The transcribed text.","example":"Hello, world."},"usage":{"$ref":"#\/components\/schemas\/TranscriptionUsage"}}},"TranscriptionTokenUsage":{"type":"object","required":["type","input_tokens","output_tokens","total_tokens"],"properties":{"type":{"type":"string","enum":["tokens"],"description":"Discriminator. Always `tokens` for this variant.","example":"tokens"},"input_tokens":{"type":"integer","description":"Number of input tokens billed for this request."},"output_tokens":{"type":"integer","description":"Number of output tokens generated."},"total_tokens":{"type":"integer","description":"Total tokens used (input + output)."},"input_token_details":{"type":"object","properties":{"audio_tokens":{"type":"integer","description":"Number of audio tokens in the input."},"text_tokens":{"type":"integer","description":"Number of text tokens in the input."}}}}},"TranscriptionUsage":{"type":"object","description":"Usage stats for the transcription. The shape depends on how the model is billed: token-based (`gpt-4o-transcribe`, `gpt-4o-mini-transcribe`) or duration-based (`whisper-1`).","oneOf":[{"$ref":"#\/components\/schemas\/TranscriptionTokenUsage"},{"$ref":"#\/components\/schemas\/TranscriptionDurationUsage"}]},"Usage":{"type":"object","properties":{"completion_tokens":{"type":"integer","format":"int32","description":"Number of tokens in the generated completion."},"completion_tokens_details":{"$ref":"#\/components\/schemas\/CompletionTokenDetails"},"prompt_tokens":{"type":"integer","format":"int32","description":"Number of tokens in the prompt."},"prompt_tokens_details":{"$ref":"#\/components\/schemas\/PromptTokenDetails"},"total_tokens":{"type":"integer","format":"int32","description":"Total number of tokens used (prompt + completion)."},"cost":{"type":"number","format":"double","description":"Requesty's USD cost for this request. Returned by default on non-streaming responses. For streaming, pass `stream_options: {\"include_usage\": true}` to receive a final chunk with `usage` (including `cost`)."}}},"DecisionQuestion":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["noul","choice","score"],"description":"`noul`: yes\/no, answered with a probability. `choice`: pick one option from `criteria`. `score`: a position on the ordered scale in `criteria`."},"instructions":{"description":"What to ask about the state. Usually a string.","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"criteria":{"description":"For `choice`: an object mapping each option to its description. For `score`: a list of labels from lowest to highest. Not used by `noul`.","oneOf":[{"type":"object","additionalProperties":{"type":"string","nullable":true}},{"type":"array","items":{"type":"string"}}]}}},"DecisionRequest":{"type":"object","required":["model","state","questions"],"properties":{"model":{"type":"string","description":"A decision model ID from [`\/v1\/models\/decision`](\/api-reference\/endpoint\/models-decision-list).","example":"openai\/gpt-6-luna"},"state":{"description":"The content to evaluate: a string, an object or an array, nested as deeply as you like. To include an image, put a `DecisionStateImage` object (`{\"type\": \"image_url\", \"image_url\": {\"url\": \"data:image\/...;base64,...\"}}`) anywhere in `state`. Images work only on models that accept them, such as `cloudflare\/clef` and `openai\/gpt-6-luna`. Send images as base64 data URLs."},"questions":{"type":"object","description":"Map of question ID to question. Each ID gets one entry in `answers`.","additionalProperties":{"$ref":"#\/components\/schemas\/DecisionQuestion"}}},"description":"Request body for `POST \/v1\/decisions`. Images go inside `state`; `assets` is rejected on this endpoint."},"DecisionAnswer":{"type":"object","required":["type"],"description":"Answer to one question. Check `type` first: a model can return `refusal` instead of answering.","properties":{"type":{"type":"string","enum":["noul","choice","score","refusal"]},"noul":{"type":"number","description":"`noul` only. Probability between 0 and 1 that the statement is true."},"choice":{"type":"string","description":"`choice` only. The most likely option."},"score":{"type":"number","description":"`score` only. Probability-weighted average of the zero-based label indices, so it can be fractional."},"confidence":{"type":"number","description":"`choice` and `score` only. Confidence in the answer, between 0 and 1."},"probabilities":{"description":"`choice` and `score` only. Probability per option (`choice`) or per label index (`score`). Depending on the model, score probabilities are an object keyed by index or a list of `{value, probability}`.","oneOf":[{"type":"object","additionalProperties":{"type":"number"}},{"type":"array","items":{"type":"object","properties":{"value":{"type":"integer"},"probability":{"type":"number"}}}}]},"legend":{"type":"object","additionalProperties":{"type":"string"},"description":"`score` only, on some models. Maps each label index to its label."}}},"DecisionUsage":{"type":"object","required":["input_tokens","output_tokens"],"properties":{"input_tokens":{"type":"integer"},"output_tokens":{"type":"integer","description":"Can be 0."}}},"DecisionResponse":{"type":"object","required":["answers","model","usage"],"properties":{"answers":{"type":"object","description":"One answer per question ID.","additionalProperties":{"$ref":"#\/components\/schemas\/DecisionAnswer"}},"id":{"type":"string","example":"rqsty-dcsn-15e2efde-f7c6-49cb-92ae-c763b1b16193"},"model":{"type":"string","description":"The upstream model name.","example":"gpt-6-luna"},"provider":{"type":"string","example":"openai"},"usage":{"$ref":"#\/components\/schemas\/DecisionUsage"}}},"DecisionModel":{"type":"object","properties":{"api":{"type":"string","enum":["decision"],"description":"The modality of the model, always 'decision'"},"id":{"type":"string","description":"The model identifier (e.g., 'openai\/gpt-6-luna')"},"object":{"type":"string","enum":["model"],"description":"The object type, always 'model'"},"created":{"type":"integer","description":"The Unix timestamp (in seconds) when the model was created"},"updated":{"type":"integer","description":"The Unix timestamp (in seconds) when the model was last updated"},"owned_by":{"type":"string","description":"The system or organization that owns the model","example":"system"},"pricing":{"type":"object","description":"Prices for the model.","properties":{"input":{"type":"number","format":"float","description":"Price per input token in USD"},"output":{"type":"number","format":"float","description":"Price per output token in USD"}}},"data_retention":{"type":"boolean","description":"Whether the provider retains request data"},"data_retention_days":{"type":"integer","description":"Number of days the provider retains request data"},"data_used_for_training":{"type":"boolean","description":"Whether the provider may use request data for training"},"privacy_comments":{"type":"string","description":"Additional privacy notes for the model"},"geolocation":{"type":"string","description":"Region the model is served from, e.g. 'us' or 'eu'"}}},"DecisionModelsResponse":{"type":"object","required":["object","data"],"properties":{"object":{"type":"string","enum":["list"],"description":"The object type, always 'list'"},"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/DecisionModel"},"description":"The list of available decision models"}}},"ErrorResponse":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["origin","message"],"properties":{"origin":{"type":"string","enum":["router","provider"],"description":"Whether the error originated from Requesty's router or an upstream provider."},"message":{"type":"string","description":"Human-readable error description."}}}}},"EmbeddingModel":{"type":"object","properties":{"api":{"type":"string","enum":["embedding"],"description":"The modality of the model, always 'embedding'"},"id":{"type":"string","description":"The model identifier (e.g., 'openai\/text-embedding-3-small')"},"object":{"type":"string","enum":["model"],"description":"The object type, always 'model'"},"created":{"type":"integer","description":"The Unix timestamp (in seconds) when the model was created"},"updated":{"type":"integer","description":"The Unix timestamp (in seconds) when the model was last updated"},"owned_by":{"type":"string","description":"The system or organization that owns the model","example":"system"},"pricing":{"type":"object","description":"Prices for the model. Only the fields relevant to the model's pricing scheme are returned.","properties":{"input_text":{"type":"number","format":"float","description":"Price per input text token in USD"},"input_audio":{"type":"number","format":"float","description":"Price per input audio token in USD"},"input_image":{"type":"number","format":"float","description":"Price per input image token in USD"},"input_video":{"type":"number","format":"float","description":"Price per input video token in USD"},"input_document":{"type":"number","format":"float","description":"Price per input document token in USD"}}},"data_retention":{"type":"boolean","description":"Whether the provider retains request data"},"data_retention_days":{"type":"integer","description":"Number of days the provider retains request data"},"data_used_for_training":{"type":"boolean","description":"Whether the provider may use request data for training"},"privacy_comments":{"type":"string","description":"Additional privacy notes for the model"},"geolocation":{"type":"string","description":"Region the model is served from, e.g. 'us' or 'eu'"},"hugging_face_id":{"type":"string","description":"Hugging Face repository id of the open-weights model being served (e.g. 'XiaomiMiMo\/MiMo-V2.6-Flash-RL'); its page is https:\/\/huggingface.co\/{hugging_face_id}. Omitted for models that are not on Hugging Face."}}},"ImageModel":{"type":"object","properties":{"api":{"type":"string","enum":["image"],"description":"The modality of the model, always 'image'"},"id":{"type":"string","description":"The model identifier (e.g., 'openai\/gpt-image-1')"},"object":{"type":"string","enum":["model"],"description":"The object type, always 'model'"},"created":{"type":"integer","description":"The Unix timestamp (in seconds) when the model was created"},"updated":{"type":"integer","description":"The Unix timestamp (in seconds) when the model was last updated"},"owned_by":{"type":"string","description":"The system or organization that owns the model","example":"system"},"pricing":{"type":"object","description":"Prices for the model. Only the fields relevant to the model's pricing scheme are returned.","properties":{"input_text":{"type":"number","format":"float","description":"Price per input text token in USD"},"input_image":{"type":"number","format":"float","description":"Price per input image token in USD"},"output_text":{"type":"number","format":"float","description":"Price per output text token in USD"},"output_image":{"type":"number","format":"float","description":"Price per output image token in USD"}}},"data_retention":{"type":"boolean","description":"Whether the provider retains request data"},"data_retention_days":{"type":"integer","description":"Number of days the provider retains request data"},"data_used_for_training":{"type":"boolean","description":"Whether the provider may use request data for training"},"privacy_comments":{"type":"string","description":"Additional privacy notes for the model"},"geolocation":{"type":"string","description":"Region the model is served from, e.g. 'us' or 'eu'"},"hugging_face_id":{"type":"string","description":"Hugging Face repository id of the open-weights model being served (e.g. 'XiaomiMiMo\/MiMo-V2.6-Flash-RL'); its page is https:\/\/huggingface.co\/{hugging_face_id}. Omitted for models that are not on Hugging Face."}}},"TranscriptionModel":{"type":"object","properties":{"api":{"type":"string","enum":["transcription"],"description":"The modality of the model, always 'transcription'"},"id":{"type":"string","description":"The model identifier (e.g., 'openai\/whisper-1')"},"object":{"type":"string","enum":["model"],"description":"The object type, always 'model'"},"created":{"type":"integer","description":"The Unix timestamp (in seconds) when the model was created"},"updated":{"type":"integer","description":"The Unix timestamp (in seconds) when the model was last updated"},"owned_by":{"type":"string","description":"The system or organization that owns the model","example":"system"},"pricing":{"type":"object","description":"Prices for the model. Token prices and `input_second` are mutually exclusive, depending on the model's pricing scheme.","properties":{"input_token":{"type":"number","format":"float","description":"Price per input token in USD"},"output_token":{"type":"number","format":"float","description":"Price per output token in USD"},"input_second":{"type":"number","format":"float","description":"Price per second of input audio in USD"}}},"data_retention":{"type":"boolean","description":"Whether the provider retains request data"},"data_retention_days":{"type":"integer","description":"Number of days the provider retains request data"},"data_used_for_training":{"type":"boolean","description":"Whether the provider may use request data for training"},"privacy_comments":{"type":"string","description":"Additional privacy notes for the model"},"geolocation":{"type":"string","description":"Region the model is served from, e.g. 'us' or 'eu'"},"hugging_face_id":{"type":"string","description":"Hugging Face repository id of the open-weights model being served (e.g. 'XiaomiMiMo\/MiMo-V2.6-Flash-RL'); its page is https:\/\/huggingface.co\/{hugging_face_id}. Omitted for models that are not on Hugging Face."}}},"SpeechModel":{"type":"object","properties":{"api":{"type":"string","enum":["speech"],"description":"The modality of the model, always 'speech'"},"id":{"type":"string","description":"The model identifier (e.g., 'openai\/tts-1')"},"object":{"type":"string","enum":["model"],"description":"The object type, always 'model'"},"created":{"type":"integer","description":"The Unix timestamp (in seconds) when the model was created"},"updated":{"type":"integer","description":"The Unix timestamp (in seconds) when the model was last updated"},"owned_by":{"type":"string","description":"The system or organization that owns the model","example":"system"},"pricing":{"type":"object","description":"Prices for the model. Token prices and `input_character` are mutually exclusive, depending on the model's pricing scheme.","properties":{"input_token":{"type":"number","format":"float","description":"Price per input token in USD"},"output_token":{"type":"number","format":"float","description":"Price per output token in USD"},"input_character":{"type":"number","format":"float","description":"Price per input character in USD"}}},"data_retention":{"type":"boolean","description":"Whether the provider retains request data"},"data_retention_days":{"type":"integer","description":"Number of days the provider retains request data"},"data_used_for_training":{"type":"boolean","description":"Whether the provider may use request data for training"},"privacy_comments":{"type":"string","description":"Additional privacy notes for the model"},"geolocation":{"type":"string","description":"Region the model is served from, e.g. 'us' or 'eu'"},"hugging_face_id":{"type":"string","description":"Hugging Face repository id of the open-weights model being served (e.g. 'XiaomiMiMo\/MiMo-V2.6-Flash-RL'); its page is https:\/\/huggingface.co\/{hugging_face_id}. Omitted for models that are not on Hugging Face."}}},"EmbeddingModelsResponse":{"type":"object","required":["object","data"],"properties":{"object":{"type":"string","enum":["list"],"description":"The object type, always 'list'"},"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/EmbeddingModel"},"description":"The list of available embedding models"}}},"ImageModelsResponse":{"type":"object","required":["object","data"],"properties":{"object":{"type":"string","enum":["list"],"description":"The object type, always 'list'"},"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/ImageModel"},"description":"The list of available image models"}}},"TranscriptionModelsResponse":{"type":"object","required":["object","data"],"properties":{"object":{"type":"string","enum":["list"],"description":"The object type, always 'list'"},"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/TranscriptionModel"},"description":"The list of available transcription models"}}},"SpeechModelsResponse":{"type":"object","required":["object","data"],"properties":{"object":{"type":"string","enum":["list"],"description":"The object type, always 'list'"},"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/SpeechModel"},"description":"The list of available speech models"}}},"AllModelsResponse":{"type":"object","required":["object","data"],"properties":{"object":{"type":"string","enum":["list"],"description":"The object type, always 'list'"},"data":{"type":"array","description":"The list of available models across every modality. Use the `api` field to tell the entries apart.","items":{"oneOf":[{"$ref":"#\/components\/schemas\/Model"},{"$ref":"#\/components\/schemas\/EmbeddingModel"},{"$ref":"#\/components\/schemas\/ImageModel"},{"$ref":"#\/components\/schemas\/TranscriptionModel"},{"$ref":"#\/components\/schemas\/SpeechModel"}],"discriminator":{"propertyName":"api"}}}}},"ImageStreamEvent":{"type":"object","description":"One event of an image streaming response. partial_image events carry a low-resolution preview; the completed event carries the final image and usage.","properties":{"type":{"type":"string","enum":["image_generation.partial_image","image_generation.completed","image_edit.partial_image","image_edit.completed"],"example":"image_generation.completed"},"b64_json":{"type":"string","description":"Base64-encoded image data (a preview for partial_image events, the final image for completed events)."},"partial_image_index":{"type":"integer","description":"Zero-based index of the partial image. Only present on partial_image events.","example":0},"sequence_number":{"type":"integer","example":2},"created_at":{"type":"integer","example":1758700000},"size":{"type":"string","example":"1024x1024"},"quality":{"type":"string","example":"high"},"background":{"type":"string","example":"opaque"},"output_format":{"type":"string","example":"png"},"usage":{"type":"object","description":"Token usage. Only present on completed events.","properties":{"total_tokens":{"type":"integer","example":1056},"input_tokens":{"type":"integer","example":16},"output_tokens":{"type":"integer","example":1040}}}}},"DecisionStateImage":{"type":"object","required":["type","image_url"],"description":"An image inside `state` on `POST \/v1\/decisions`.","properties":{"type":{"type":"string","enum":["image_url"],"description":"Always `image_url`."},"image_url":{"type":"object","required":["url"],"properties":{"url":{"type":"string","description":"Base64 image data URL (`data:image\/...;base64,...`).","example":"data:image\/jpeg;base64,\/9j\/4AAQSkZJRgABAQAAAQABAAD..."}}}}},"DecisionImageAsset":{"type":"object","required":["type","format","data_base64"],"description":"An image sent in `assets` on `POST \/v1\/systemone`.","properties":{"type":{"type":"string","enum":["image"],"description":"Always `image`."},"format":{"type":"string","description":"Image format without the `image\/` prefix.","example":"jpeg"},"data_base64":{"type":"string","description":"Base64-encoded image bytes, without a `data:` prefix.","example":"\/9j\/4AAQSkZJRgABAQAAAQABAAD..."}}},"SystemOneRequest":{"type":"object","required":["model","state","questions"],"properties":{"model":{"type":"string","description":"A decision model ID from [`\/v1\/models\/decision`](\/api-reference\/endpoint\/models-decision-list).","example":"openai\/gpt-6-luna"},"state":{"description":"The content to evaluate: a string, an object or an array. Mention each asset's name in `state` so the model knows which image it refers to; `typesafe` models reject assets that `state` does not reference."},"questions":{"type":"object","description":"Map of question ID to question. Each ID gets one entry in `answers`.","additionalProperties":{"$ref":"#\/components\/schemas\/DecisionQuestion"}},"assets":{"type":"object","description":"Map of asset name to image. Only for models that accept images, such as `cloudflare\/clef` and `openai\/gpt-6-luna`.","additionalProperties":{"$ref":"#\/components\/schemas\/DecisionImageAsset"}}},"description":"Request body for `POST \/v1\/systemone`, in TypeSafe's System One format. Images go in `assets`; images inside `state` are rejected on this endpoint."},"SystemOneMultipartRequest":{"type":"object","required":["request"],"description":"Multipart form of `POST \/v1\/systemone`, as sent by TypeSafe's SDKs. The `request` part holds the JSON request; each asset names the part that carries its image bytes as `{\"type\": \"image\", \"part\": \"<part name>\"}`. Every other part is an image file with an `image\/*` content type.","properties":{"request":{"type":"string","description":"The request as JSON, with `assets` entries that reference image parts by name.","example":"{\"model\":\"openai\/gpt-6-luna\",\"state\":\"Listing title: Red leather armchair. Photo: listing_photo\",\"questions\":{\"matches_title\":{\"type\":\"noul\",\"instructions\":\"The photo listing_photo shows the item in the title.\"}},\"assets\":{\"listing_photo\":{\"type\":\"image\",\"part\":\"photo\"}}}"}},"additionalProperties":{"type":"string","format":"binary"}},"APIKeyGroupInfo":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The unique identifier of the group"}},"required":["id"]},"AddMemberRequest":{"type":"object","required":["user_id","role"],"properties":{"user_id":{"type":"string","description":"The ID of the user to add to the group","example":"user-123"},"role":{"type":"string","enum":["admin","member"],"description":"The role to assign to the member","example":"member"}},"example":{"user_id":"user-123","role":"member"}},"ApiKeyInfo":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"monthly_limit":{"type":"number","format":"decimal"},"monthly_spend":{"type":"number","format":"decimal"},"expires_at":{"type":"string","format":"date-time","description":"When the API key expires. Omitted for non-expiring keys.","example":"2025-12-31T23:59:59Z"},"permissions":{"$ref":"#\/components\/schemas\/GetApiKeyPermissions"},"labels":{"type":"object","additionalProperties":{"type":"string"},"description":"Key-value labels for the API key","example":{"department":"engineering"}},"created_at":{"type":"string","format":"date-time","description":"When the API key was created, as an RFC 3339 timestamp.","example":"2026-10-01T13:47:23Z"},"created_by":{"$ref":"#\/components\/schemas\/User"},"group":{"$ref":"#\/components\/schemas\/APIKeyGroupInfo","description":"Group information if the API key belongs to a group"}},"required":["id","name","monthly_limit","monthly_spend","permissions","created_at"]},"ApiKeyInfoResponse":{"type":"object","required":["id","name","logging","monthly_spend","monthly_limit","permissions","created_at"],"properties":{"id":{"type":"string","format":"uuid","description":"The unique identifier of the API key"},"name":{"type":"string","description":"The name of the API key"},"logging":{"type":"boolean","description":"Whether logging is enabled for this API key"},"monthly_spend":{"type":"number","format":"decimal","description":"The amount spent by this API key in the current month"},"monthly_limit":{"type":"number","format":"decimal","description":"The monthly spending limit for this API key (0 means unlimited)"},"expires_at":{"type":"string","format":"date-time","description":"When the API key expires. Omitted for non-expiring keys.","example":"2025-12-31T23:59:59Z"},"permissions":{"type":"object","properties":{"manage":{"type":"string","enum":["none","read","write"],"description":"Permission level for management operations"},"completions":{"type":"string","enum":["none","read","write"],"description":"Permission level for completions operations"}},"required":["manage","completions"]},"created_at":{"type":"string","format":"date-time","description":"When the API key was created, as an RFC 3339 timestamp.","example":"2026-10-01T13:47:23Z"},"group":{"$ref":"#\/components\/schemas\/APIKeyGroupInfo","description":"Group information if the API key belongs to a group"},"labels":{"type":"object","additionalProperties":{"type":"string"},"description":"Key-value labels for the API key","example":{"department":"engineering"}}}},"ApiKeyPermissions":{"type":"string","enum":["none","read","write"]},"ApiKeyUsageEntry":{"type":"object","properties":{"completions_requests":{"type":"integer"},"decision_requests":{"type":"integer","description":"Number of decision requests"},"embedding_requests":{"type":"integer","description":"Number of embedding requests"},"image_requests":{"type":"integer","description":"Number of image generation requests"},"speech_requests":{"type":"integer","description":"Number of text-to-speech requests"},"transcription_requests":{"type":"integer","description":"Number of speech-to-text requests"},"total_requests":{"type":"integer","description":"Total number of requests across all modalities"},"spend":{"type":"number","format":"decimal"},"input_tokens":{"type":"integer"},"output_tokens":{"type":"integer"},"total_tokens":{"type":"integer"},"grouped_data":{"type":"array","items":{"$ref":"#\/components\/schemas\/ApiKeyUsageGrouped"}}}},"ApiKeyUsageGrouped":{"type":"object","properties":{"group_by_values":{"type":"object","additionalProperties":true},"completions_requests":{"type":"integer"},"decision_requests":{"type":"integer"},"embedding_requests":{"type":"integer"},"image_requests":{"type":"integer"},"speech_requests":{"type":"integer"},"transcription_requests":{"type":"integer"},"total_requests":{"type":"integer"},"spend":{"type":"number","format":"decimal"},"input_tokens":{"type":"integer"},"output_tokens":{"type":"integer"},"total_tokens":{"type":"integer"}}},"CreateApiKeyRequest":{"type":"object","properties":{"name":{"type":"string"},"monthly_limit":{"type":"number","format":"decimal"},"expires_at":{"type":"string","format":"date-time","description":"When the new API key expires, in RFC 3339 format. Must be in the future. Overrides the organization's default key expiry. Omit it to use the default.","example":"2026-12-31T23:59:59Z"},"permissions":{"$ref":"#\/components\/schemas\/GetApiKeyPermissions"},"group_id":{"type":"string","format":"uuid","description":"ID of the group the new key belongs to. Its spending counts toward that group's budgets. The caller must be a member of the group. Cannot be combined with `service_account_id`.","example":"123e4567-e89b-12d3-a456-426614174000"},"service_account_id":{"type":"string","format":"uuid","description":"ID of a service account in your organization. The new key is created under that service account. Only organization admins can set it; a management API key always qualifies. Cannot be combined with `group_id`. Returns `404` if the service account does not exist in your organization.","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6"},"access_list_id":{"type":"string","format":"uuid","description":"ID of an [access list](\/features\/access-lists) to attach to the new key, limiting which models it can call.","example":"7c9e6679-7425-40de-944b-e07fc1f90ae7"},"logging":{"type":"boolean","description":"Whether request logs are stored for the new key. Defaults to the organization's default. Always off when the organization requires zero data retention, and only applied when the organization lets members change logging or the caller is an admin.","example":true}},"required":["name"]},"CreateApiKeyResponse":{"type":"object","properties":{"api_key_id":{"type":"string","format":"uuid"},"api_key":{"type":"string"}},"required":["api_key_id","api_key"]},"CreateGroupRequest":{"type":"object","required":["name"],"properties":{"name":{"type":"string","description":"The name of the group","example":"Engineering Team"},"monthly_limit":{"type":"number","format":"double","description":"Total monthly budget for the new group. 0 means unlimited. Deprecated: this field will be migrated to `monthly_budget`. Optional: omit it to use the organization's group defaults set on the Groups page.","example":1000}},"example":{"name":"Engineering Team","monthly_limit":1000}},"CreateGroupResponse":{"type":"object","properties":{"group_id":{"type":"string","format":"uuid","description":"The ID of the created group","example":"123e4567-e89b-12d3-a456-426614174000"}},"required":["group_id"]},"GetApiKeyPermissions":{"type":"object","properties":{"manage":{"$ref":"#\/components\/schemas\/ApiKeyPermissions"},"completions":{"$ref":"#\/components\/schemas\/ApiKeyPermissions"}},"required":["manage","completions"]},"GetApiKeyUsageRequest":{"type":"object","properties":{"start":{"type":"string","format":"date-time","description":"Start date in RFC3339 format (e.g., 2025-01-01T00:00:00Z). Required. The date range cannot exceed 100 days from start to end.","example":"2025-01-01T00:00:00Z"},"end":{"type":"string","format":"date-time","description":"End date in RFC3339 format (e.g., 2025-01-31T23:59:59Z). Optional. Defaults to 24 hours from start if not specified. Must be after start date. The date range cannot exceed 100 days.","example":"2025-01-31T23:59:59Z"},"group_by":{"type":"array","items":{"type":"string"},"description":"Fields to group by: group_name, group_id, member_id, member_email, user_id, api_key_id, model_requested, model_used, provider_used, is_byok, origin_title, user_agent, api, finish_reason, status_code, extra.<field_name>, api_key_label.<label_key>, or group_label.<label_key>. Rows missing a requested label are grouped under \"Unknown\". Grouping by api returns one group per request type: chat, embedding, image, speech, transcription, or decision. Grouping by user_agent returns one group per client, taken from the User-Agent header with version numbers and parenthesised comments removed and lowercased (for example claude-cli\/2.1.221 (external, cli) becomes claude-cli\/). Grouping by finish_reason returns one group per finish reason, for example stop or tool_calls, so a coding agent turn that makes several tool calls and ends with stop can be counted by its stop rows. Grouping by status_code returns one group per HTTP status code, with 0 for successful requests."},"resolution":{"type":"string","enum":["hour","day","month"],"default":"day","description":"Time resolution for aggregation"}},"required":["start"]},"GetApiKeyUsageResponse":{"type":"object","properties":{"usage":{"type":"object","additionalProperties":{"$ref":"#\/components\/schemas\/ApiKeyUsageEntry"},"description":"Map of period (string) to usage entry"}},"required":["usage"]},"GetApiKeysResponse":{"type":"object","properties":{"keys":{"type":"array","items":{"$ref":"#\/components\/schemas\/ApiKeyInfo"}}},"required":["keys"]},"GetGroupResponse":{"type":"object","properties":{"group":{"$ref":"#\/components\/schemas\/OrganizationGroup"}},"required":["group"]},"GetGroupsResponse":{"type":"object","properties":{"groups":{"type":"array","items":{"$ref":"#\/components\/schemas\/OrganizationGroupListItem"},"description":"List of groups"}},"required":["groups"]},"GetOrgMembersResponse":{"type":"object","required":["members"],"properties":{"members":{"type":"array","items":{"$ref":"#\/components\/schemas\/OrgMember"},"description":"List of organization members"}}},"OrgMember":{"type":"object","required":["user_id","user_email"],"properties":{"user_id":{"type":"string","description":"Unique identifier of the member"},"user_email":{"type":"string","format":"email","description":"Email address of the member"},"first_name":{"type":"string","description":"First name of the member"},"last_name":{"type":"string","description":"Last name of the member"}}},"ListServiceAccountsResponse":{"type":"object","properties":{"service_accounts":{"type":"array","items":{"$ref":"#\/components\/schemas\/ServiceAccount"},"description":"Service accounts in the organization. Omitted when the organization has no service accounts."}}},"ServiceAccount":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the service account. Use it as `service_account_id` when creating an API key.","example":"3f6c2a1e-8b4d-4c7a-9e2f-5d1b7a9c0e42"},"name":{"type":"string","description":"Name of the service account","example":"Production API"},"author_id":{"type":"string","description":"User ID of the member who created the service account","example":"user_2abcDEF123ghiJKL456mno"}}},"GetOrgResponse":{"type":"object","required":["name","balance"],"properties":{"name":{"type":"string","description":"Name of the organization"},"balance":{"type":"number","format":"decimal","description":"Balance of the organization"}}},"GetOrgUsageResponse":{"type":"object","properties":{"usage":{"type":"object","additionalProperties":{"$ref":"#\/components\/schemas\/OrgUsageEntry"},"description":"Map of period (string) to usage entry"}},"required":["usage"]},"OrgUsageEntry":{"type":"object","properties":{"completions_requests":{"type":"integer","description":"Number of chat completion requests"},"decision_requests":{"type":"integer","description":"Number of decision requests"},"embedding_requests":{"type":"integer","description":"Number of embedding requests"},"image_requests":{"type":"integer","description":"Number of image generation requests"},"speech_requests":{"type":"integer","description":"Number of text-to-speech requests"},"transcription_requests":{"type":"integer","description":"Number of speech-to-text requests"},"total_requests":{"type":"integer","description":"Total number of requests across all modalities"},"spend":{"type":"number","format":"decimal","description":"Total spend for the period"},"input_tokens":{"type":"integer","description":"Total input tokens consumed"},"output_tokens":{"type":"integer","description":"Total output tokens generated"},"total_tokens":{"type":"integer","description":"Total tokens (input + output)"},"grouped_data":{"type":"array","items":{"$ref":"#\/components\/schemas\/OrgUsageGrouped"},"description":"Breakdown by the requested group_by fields. Only present when group_by is specified."}}},"OrgUsageGrouped":{"type":"object","properties":{"group_by_values":{"type":"object","additionalProperties":true,"description":"Map of group_by field names to their values for this group"},"completions_requests":{"type":"integer"},"decision_requests":{"type":"integer"},"embedding_requests":{"type":"integer"},"image_requests":{"type":"integer"},"speech_requests":{"type":"integer"},"transcription_requests":{"type":"integer"},"total_requests":{"type":"integer"},"spend":{"type":"number","format":"decimal"},"input_tokens":{"type":"integer"},"output_tokens":{"type":"integer"},"total_tokens":{"type":"integer"}}},"AuditLog":{"type":"object","properties":{"type":{"type":"string","description":"Kind of change recorded, for example `create_api_key` or `update_policy`.","example":"create_api_key"},"log":{"type":"string","description":"Human-readable description of the change, as shown in the dashboard. A log that cannot be displayed carries an error message here instead.","example":"admin@example.com created API key Production API"},"timestamp":{"type":"string","format":"date-time","description":"When the change was made, in RFC 3339 format.","example":"2026-11-22T14:03:27Z"}}},"ListAuditLogsResponse":{"type":"object","properties":{"logs":{"type":"array","items":{"$ref":"#\/components\/schemas\/AuditLog"},"description":"Audit logs on this page, newest first. Omitted when no logs match."},"total":{"type":"integer","format":"int32","description":"Number of audit logs matching the request across all pages. Omitted when no logs match.","example":2}}},"OrganizationGroup":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The group ID","example":"123e4567-e89b-12d3-a456-426614174000"},"organization_id":{"type":"string","description":"The organization ID","example":"org-123"},"name":{"type":"string","description":"The group name","example":"Engineering Team"},"monthly_budget":{"type":"number","format":"double","description":"Total monthly budget shared by the group. `0` means unlimited.","example":1000},"monthly_budget_per_user":{"type":"number","format":"double","description":"Monthly budget applied to each user in the group. `0` means unlimited.","example":100},"created_by":{"type":"string","description":"User ID who created the group","example":"user-123"},"created_at":{"type":"string","format":"date-time","description":"When the group was created","example":"2025-01-15T10:30:00Z"},"members":{"type":"array","items":{"$ref":"#\/components\/schemas\/OrganizationGroupMember"},"description":"List of group members"},"labels":{"type":"object","additionalProperties":{"type":"string"},"description":"Key-value labels for the group","example":{"department":"engineering"}},"access_list_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"IDs of the [access lists](\/features\/access-lists) attached to the group."},"guardrail_policy_id":{"type":"string","format":"uuid","description":"ID of the guardrail policy applied to the group. Omitted when the group has none."}},"required":["id","organization_id","name","created_by","created_at","members"]},"OrganizationGroupListItem":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The group ID","example":"123e4567-e89b-12d3-a456-426614174000"},"organization_id":{"type":"string","description":"The organization ID","example":"org-123"},"name":{"type":"string","description":"The group name","example":"Engineering Team"},"members_count":{"type":"integer","description":"Number of members in the group","example":5},"monthly_spend":{"type":"number","format":"double","description":"Current monthly spending of the group.","example":450.25},"monthly_budget":{"type":"number","format":"double","description":"Total monthly budget shared by the group. `0` means unlimited.","example":1000},"monthly_budget_per_user":{"type":"number","format":"double","description":"Monthly budget applied to each user in the group. `0` means unlimited.","example":100},"created_by":{"type":"string","description":"User ID who created the group","example":"user-123"},"created_at":{"type":"string","format":"date-time","description":"When the group was created","example":"2025-01-15T10:30:00Z"},"labels":{"type":"object","additionalProperties":{"type":"string"},"description":"Key-value labels for the group","example":{"department":"engineering"}},"access_list_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"IDs of the [access lists](\/features\/access-lists) attached to the group."},"guardrail_policy_id":{"type":"string","format":"uuid","description":"ID of the guardrail policy applied to the group. Omitted when the group has none."}},"required":["id","organization_id","name","members_count","monthly_spend","created_by","created_at"]},"OrganizationGroupMember":{"type":"object","properties":{"id":{"type":"string","description":"The member user ID","example":"user-123"},"email":{"type":"string","format":"email","description":"The member email","example":"user@example.com"},"role":{"type":"string","enum":["admin","member"],"description":"The member role","example":"member"},"monthly_limit":{"type":"number","format":"double","description":"Monthly budget for the member: the member's budget override, or the group's `monthly_budget_per_user` when no override is set. Deprecated: this field will be migrated to `monthly_budget`.","nullable":true,"example":500},"monthly_spend":{"type":"number","format":"double","description":"Current monthly spending of the member inside the group.","example":250.5},"active":{"type":"boolean","description":"Whether the member is active","example":true}},"required":["id","email","role","monthly_spend","active"]},"RemoveMemberRequest":{"type":"object","required":["user_id"],"properties":{"user_id":{"type":"string","description":"The ID of the user to remove from the group","example":"user-123"}},"example":{"user_id":"user-123"}},"UpdateExpiryRequest":{"type":"object","properties":{"expires_at":{"type":"string","format":"date-time","description":"Expiry date in RFC3339 format (e.g., 2025-12-31T23:59:59Z). If not set or null, the current expiry will be removed, making the API key non-expiring.","example":"2025-12-31T23:59:59Z"}}},"UpdateLabelRequest":{"type":"object","properties":{"labels":{"type":"object","additionalProperties":{"type":"string"},"description":"Key-value pairs of labels. Empty object removes all labels."}},"required":["labels"]},"UpdateLimitRequest":{"type":"object","properties":{"monthly_limit":{"type":"number","format":"decimal"}},"required":["monthly_limit"]},"UpdateMemberRoleRequest":{"type":"object","required":["role"],"properties":{"role":{"type":"string","enum":["admin","member"],"description":"The new role to assign to the member","example":"admin"}},"example":{"role":"admin"}},"UpdateGroupBudgetRequest":{"type":"object","required":["monthly_budget"],"properties":{"monthly_budget":{"type":"number","format":"double","description":"Total monthly budget for the group in USD. Set to `0` for unlimited spending.","example":1000}},"example":{"monthly_budget":1000}},"UpdateGroupBudgetPerUserRequest":{"type":"object","required":["monthly_budget_per_user"],"properties":{"monthly_budget_per_user":{"type":"number","format":"double","description":"Monthly budget applied to each user in the group in USD. Set to `0` for unlimited spending per user.","example":100}},"example":{"monthly_budget_per_user":100}},"UpdateGroupLabelsRequest":{"type":"object","required":["labels"],"properties":{"labels":{"type":"object","additionalProperties":{"type":"string"},"description":"Key-value pairs of labels. Replaces the entire labels map for the group. An empty object clears all labels.","example":{"department":"engineering"}}},"example":{"labels":{"department":"engineering"}}},"UpdateMemberBudgetOverrideRequest":{"type":"object","properties":{"budget_override":{"type":"number","format":"double","nullable":true,"description":"Monthly budget override for the member in USD. Set to null to remove the override and fall back to the group budget.","example":100}},"example":{"budget_override":100}},"AccessListObject":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The access list ID"},"name":{"type":"string","description":"The access list name"},"organization_id":{"type":"string","description":"The organization ID that owns this access list"},"auto_approve":{"type":"boolean","description":"Whether new models matching the list patterns are automatically approved"},"chat":{"type":"array","items":{"type":"string"},"description":"Allowed chat\/completion model identifiers"},"embedding":{"type":"array","items":{"type":"string"},"description":"Allowed embedding model identifiers"},"image":{"type":"array","items":{"type":"string"},"description":"Allowed image generation model identifiers"},"transcription":{"type":"array","items":{"type":"string"},"description":"Allowed transcription model identifiers"},"speech":{"type":"array","items":{"type":"string"},"description":"Allowed speech model identifiers"},"decision":{"type":"array","items":{"type":"string"},"description":"Allowed decision model identifiers"}},"required":["id","name","organization_id","auto_approve"]},"CreateAccessListRequest":{"type":"object","required":["name"],"properties":{"name":{"type":"string","description":"Name for the access list","example":"Production Models"},"auto_approve":{"type":"boolean","description":"Whether new models matching the list patterns are automatically approved","default":false},"chat":{"type":"array","items":{"type":"string"},"description":"Chat\/completion model identifiers to allow","example":["openai\/gpt-4o","anthropic\/claude-sonnet-5-5"]},"embedding":{"type":"array","items":{"type":"string"},"description":"Embedding model identifiers to allow"},"image":{"type":"array","items":{"type":"string"},"description":"Image generation model identifiers to allow"},"transcription":{"type":"array","items":{"type":"string"},"description":"Transcription model identifiers to allow"},"speech":{"type":"array","items":{"type":"string"},"description":"Speech model identifiers to allow"},"decision":{"type":"array","items":{"type":"string"},"description":"Decision model identifiers to allow","example":["typesafe\/jev-latest"]}}},"CreateAccessListResponse":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid","description":"The ID of the newly created access list"}}},"GetAccessListResponse":{"type":"object","required":["access_list"],"properties":{"access_list":{"$ref":"#\/components\/schemas\/AccessListObject"}}},"ListAccessListsResponse":{"type":"object","required":["access_lists"],"properties":{"access_lists":{"type":"array","items":{"$ref":"#\/components\/schemas\/AccessListObject"},"description":"List of access lists in the organization"}}},"UpdateAccessListRequest":{"type":"object","description":"All fields are optional. `name` and `auto_approve` only change when included. The model fields replace the whole model list: if any model field is included, every modality not included is cleared. Send all modalities to keep them.","properties":{"name":{"type":"string","description":"New name for the access list"},"auto_approve":{"type":"boolean","description":"Whether new models matching the list patterns are automatically approved"},"chat":{"type":"array","items":{"type":"string"},"description":"Allowed chat\/completion model identifiers. Replaces the current list; if any model field is sent and this one is omitted, it is cleared"},"embedding":{"type":"array","items":{"type":"string"},"description":"Allowed embedding model identifiers. Replaces the current list; if any model field is sent and this one is omitted, it is cleared"},"image":{"type":"array","items":{"type":"string"},"description":"Allowed image generation model identifiers. Replaces the current list; if any model field is sent and this one is omitted, it is cleared"},"transcription":{"type":"array","items":{"type":"string"},"description":"Allowed transcription model identifiers. Replaces the current list; if any model field is sent and this one is omitted, it is cleared"},"speech":{"type":"array","items":{"type":"string"},"description":"Allowed speech model identifiers. Replaces the current list; if any model field is sent and this one is omitted, it is cleared"},"decision":{"type":"array","items":{"type":"string"},"description":"Allowed decision model identifiers. Replaces the current list; if any model field is sent and this one is omitted, it is cleared"}}},"SetGroupDefaultAccessListRequest":{"type":"object","properties":{"access_list_id":{"type":"string","format":"uuid","nullable":true,"description":"The access list ID to set as the default for groups. Pass null to clear the default.","example":"123e4567-e89b-12d3-a456-426614174000"}}},"OrgApprovedModelsResponse":{"type":"object","description":"The organization's approved models by modality. When every modality is empty, every model in the catalog is allowed.","properties":{"chat":{"type":"array","items":{"type":"string"},"description":"Approved chat\/completion models, as `provider\/model` names","example":["openai\/gpt-4o","anthropic\/claude-sonnet-5-5"]},"embedding":{"type":"array","items":{"type":"string"},"description":"Approved embedding models, as `provider\/model` names","example":["openai\/text-embedding-3-small"]},"image":{"type":"array","items":{"type":"string"},"description":"Approved image generation models, as `provider\/model` names"},"transcription":{"type":"array","items":{"type":"string"},"description":"Approved transcription models, as `provider\/model` names"},"speech":{"type":"array","items":{"type":"string"},"description":"Approved speech models, as `provider\/model` names"},"decision":{"type":"array","items":{"type":"string"},"description":"Approved decision models, as `provider\/model` names","example":["typesafe\/jev-latest"]}}},"SetOrgApprovedModelsRequest":{"type":"object","description":"The full set of approved models. Modalities that are omitted are cleared.","properties":{"chat":{"type":"array","items":{"type":"string"},"description":"Chat\/completion models to approve, as `provider\/model` names or model IDs. Replaces the current list; omitted or empty means no chat\/completion models are approved unless every modality is empty","example":["openai\/gpt-4o","anthropic\/claude-sonnet-5-5"]},"embedding":{"type":"array","items":{"type":"string"},"description":"Embedding models to approve, as `provider\/model` names or model IDs. Replaces the current list; omitted or empty means no embedding models are approved unless every modality is empty","example":["openai\/text-embedding-3-small"]},"image":{"type":"array","items":{"type":"string"},"description":"Image generation models to approve, as `provider\/model` names or model IDs. Replaces the current list; omitted or empty means no image generation models are approved unless every modality is empty"},"transcription":{"type":"array","items":{"type":"string"},"description":"Transcription models to approve, as `provider\/model` names or model IDs. Replaces the current list; omitted or empty means no transcription models are approved unless every modality is empty"},"speech":{"type":"array","items":{"type":"string"},"description":"Speech models to approve, as `provider\/model` names or model IDs. Replaces the current list; omitted or empty means no speech models are approved unless every modality is empty"},"decision":{"type":"array","items":{"type":"string"},"description":"Decision models to approve, as `provider\/model` names or model IDs. Replaces the current list; omitted or empty means no decision models are approved unless every modality is empty","example":["typesafe\/jev-latest"]}}},"User":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"}}},"PolicyFallbackModel":{"type":"object","required":["model","key","retries"],"properties":{"model":{"type":"string","description":"Model identifier in `provider\/model` form","example":"openai\/gpt-4o"},"key":{"type":"string","enum":["POLICY_KEY_BYOK_ONLY","POLICY_KEY_NON_BYOK_ONLY","POLICY_KEY_REQUESTY_FIRST","POLICY_KEY_BYOK_FIRST"],"description":"Which credentials to use for this model: `POLICY_KEY_BYOK_ONLY` uses only your own provider key, `POLICY_KEY_NON_BYOK_ONLY` uses only Requesty's key, `POLICY_KEY_REQUESTY_FIRST` and `POLICY_KEY_BYOK_FIRST` try one and fall back to the other.","example":"POLICY_KEY_REQUESTY_FIRST"},"retries":{"type":"integer","description":"Number of attempts for this model before moving to the next one in the chain. Must be between 1 and 5, and the retries of all models in the policy must add up to at most 35.","example":2,"minimum":1,"maximum":5}}},"PolicyLoadBalanceModel":{"type":"object","required":["model","key","weight"],"properties":{"model":{"type":"string","description":"Model identifier in `provider\/model` form, or an existing policy as `policy\/<name>`. A target policy cannot be an Auto policy or a load balance policy that itself targets policies.","example":"openai\/gpt-4o"},"key":{"type":"string","enum":["POLICY_KEY_BYOK_ONLY","POLICY_KEY_NON_BYOK_ONLY","POLICY_KEY_REQUESTY_FIRST","POLICY_KEY_BYOK_FIRST"],"description":"Which credentials to use for this model: `POLICY_KEY_BYOK_ONLY` uses only your own provider key, `POLICY_KEY_NON_BYOK_ONLY` uses only Requesty's key, `POLICY_KEY_REQUESTY_FIRST` and `POLICY_KEY_BYOK_FIRST` try one and fall back to the other.","example":"POLICY_KEY_REQUESTY_FIRST"},"weight":{"type":"integer","description":"Relative share of traffic sent to this model. Must be greater than 0.","example":1,"minimum":1}}},"PolicyLatencyModel":{"type":"object","required":["model","key"],"properties":{"model":{"type":"string","description":"Model identifier in `provider\/model` form","example":"openai\/gpt-4o"},"key":{"type":"string","enum":["POLICY_KEY_BYOK_ONLY","POLICY_KEY_NON_BYOK_ONLY","POLICY_KEY_REQUESTY_FIRST","POLICY_KEY_BYOK_FIRST"],"description":"Which credentials to use for this model: `POLICY_KEY_BYOK_ONLY` uses only your own provider key, `POLICY_KEY_NON_BYOK_ONLY` uses only Requesty's key, `POLICY_KEY_REQUESTY_FIRST` and `POLICY_KEY_BYOK_FIRST` try one and fall back to the other.","example":"POLICY_KEY_REQUESTY_FIRST"}}},"PolicyConfig":{"type":"object","description":"Policy strategy and model chain. Set exactly one of `fallback`, `load_balance`, `latency`, `best_balance`, or `decision`, with at least one model.","properties":{"fallback":{"type":"object","description":"Try models in order, moving to the next when a request fails","properties":{"models":{"type":"array","description":"Models in priority order. Their `retries` must add up to at most 35.","items":{"$ref":"#\/components\/schemas\/PolicyFallbackModel"}}}},"load_balance":{"type":"object","description":"Distribute requests across models by weight","properties":{"models":{"type":"array","items":{"$ref":"#\/components\/schemas\/PolicyLoadBalanceModel"}}}},"latency":{"type":"object","description":"Route each request to the model with the lowest observed latency","properties":{"models":{"type":"array","items":{"$ref":"#\/components\/schemas\/PolicyLatencyModel"}}}},"best_balance":{"type":"object","description":"Rank models on every request by `latency^latency_weight \u00d7 price^price_weight \u00d7 (1 \/ success rate)^reliability_weight`, lowest first, and fall back down the ranking. Price is the price recently charged after prompt caching. Shown as **Advanced** in the dashboard. Weights must not be negative and at least one must be above 0; a weight of 0 or an omitted weight ignores that factor.","properties":{"models":{"type":"array","items":{"$ref":"#\/components\/schemas\/PolicyLatencyModel"}},"latency_weight":{"type":"number","format":"double","minimum":0,"description":"How much a slower response counts against a model.","example":1},"price_weight":{"type":"number","format":"double","minimum":0,"description":"How much a higher price after caching counts against a model.","example":1},"reliability_weight":{"type":"number","format":"double","minimum":0,"description":"How much failed requests count against a model.","example":1}}},"decision":{"type":"object","description":"Auto routing: a classifier reads the first user message of a conversation, picks the branch whose label matches best, and the conversation stays on that branch's target. Shown as **Auto** in the dashboard. See [Auto Routing](\/features\/auto-routing).","required":["models","instruction","branches","default_model"],"properties":{"models":{"type":"array","description":"The classifier: a [decision model](\/api-reference\/endpoint\/models-decision-list) in `provider\/model` form.","items":{"type":"object","required":["model"],"properties":{"model":{"type":"string","description":"Decision model identifier","example":"typesafe\/jev-1.14.0"}}},"minItems":1},"instruction":{"type":"string","description":"The question the classifier answers, with each branch label as an option.","example":"What kind of change is this?"},"branches":{"type":"object","additionalProperties":{"type":"string"},"description":"Map of branch label to target. A target is a model in `provider\/model` form or an existing non Auto policy as `policy\/<name>`. At least one branch is required.","example":{"rename, move or refactor with no behaviour change":"anthropic\/claude-sonnet-4-5","new feature across several files":"policy\/opus-fallback"},"minProperties":1},"default_model":{"type":"string","description":"Target used when no branch reaches `min_threshold` or the classifier fails. Same forms as a branch target.","example":"anthropic\/claude-opus-4-5"},"min_threshold":{"type":"number","format":"double","minimum":0,"maximum":1,"description":"Probability the best branch needs to be chosen, between 0 and 1. Below it, `default_model` is used.","example":0.5}}}}},"CreatePolicyRequest":{"type":"object","required":["name","config","scope"],"properties":{"name":{"type":"string","description":"Policy name. Use it as the `model` in inference requests, for example `policy\/production-chat`.","example":"production-chat"},"config":{"$ref":"#\/components\/schemas\/PolicyConfig"},"scope":{"type":"string","enum":["POLICY_SCOPE_ORGANIZATION"],"description":"Policy scope. The Management API only accepts `POLICY_SCOPE_ORGANIZATION`.","example":"POLICY_SCOPE_ORGANIZATION"}},"example":{"name":"production-chat","config":{"fallback":{"models":[{"model":"openai\/gpt-4o","key":"POLICY_KEY_REQUESTY_FIRST","retries":2},{"model":"anthropic\/claude-sonnet-4","key":"POLICY_KEY_BYOK_FIRST","retries":1}]}},"scope":"POLICY_SCOPE_ORGANIZATION"}},"UpdatePolicyRequest":{"type":"object","required":["name","config","scope"],"properties":{"name":{"type":"string","description":"New policy name","example":"production-chat"},"config":{"$ref":"#\/components\/schemas\/PolicyConfig"},"scope":{"type":"string","enum":["POLICY_SCOPE_ORGANIZATION"],"description":"Policy scope. The Management API only accepts `POLICY_SCOPE_ORGANIZATION`.","example":"POLICY_SCOPE_ORGANIZATION"}}},"PolicyObject":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The policy ID"},"name":{"type":"string","description":"The policy name"},"config":{"$ref":"#\/components\/schemas\/PolicyConfig"},"organization_id":{"type":"string","description":"The organization ID that owns this policy"},"author_id":{"type":"string","description":"The user ID that created the policy"},"scope":{"type":"string","enum":["POLICY_SCOPE_ORGANIZATION"],"description":"Policy scope. The Management API only accepts `POLICY_SCOPE_ORGANIZATION`.","example":"POLICY_SCOPE_ORGANIZATION"}}},"ListPoliciesResponse":{"type":"object","properties":{"policies":{"type":"array","description":"The organization's routing policies. Omitted when the organization has no policies.","items":{"$ref":"#\/components\/schemas\/PolicyObject"}}},"example":{"policies":[{"id":"8f2c1e4a-3b6d-4f1a-9c7e-2d5b8a1f0e3c","name":"production-chat","config":{"fallback":{"models":[{"model":"openai\/gpt-4o","key":"POLICY_KEY_REQUESTY_FIRST","retries":2},{"model":"anthropic\/claude-sonnet-4","key":"POLICY_KEY_BYOK_FIRST","retries":1}]}},"organization_id":"5d1b9e2f-7a4c-4e8b-a3f6-1c2d3e4f5a6b","author_id":"a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d","scope":"POLICY_SCOPE_ORGANIZATION"}]}},"PolicyResponse":{"type":"object","properties":{"policy":{"$ref":"#\/components\/schemas\/PolicyObject"}}}},"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key for authentication"},"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"API key for authentication (alternative to Bearer auth)"}}}}