{"openapi":"3.1.0","jsonSchemaDialect":"https://json-schema.org/draft/2020-12/schema","info":{"title":"Inference API","version":"2026-11-04.2","description":"Versioned public HTTP and protocol contracts. Availability depends on the model, project and billing mode; a documented operation is not integration or production verification. No gateway fees are added."},"servers":[{"url":"https://api.cloakray.com"}],"security":[{"ApiKeyBearer":[]},{"ApiKeyHeader":[]}],"paths":{"/v1/chat/completions":{"post":{"operationId":"post_v1_chat_completions","summary":"Chat Completions","tags":["chat"],"responses":{"200":{"description":"Successful result.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"created":{"type":"number"},"model":{"type":"string"},"choices":{"type":"array","items":{"type":"object","properties":{"index":{"type":"number"},"message":{"type":"object","properties":{"role":{"type":"string"},"content":{"type":["string","null"]},"reasoning":{"type":["string","null"]},"tool_calls":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"name":{"type":"string"},"arguments":{"type":"string"}},"required":["name","arguments"]}},"required":["id","type","function"]}},"images":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["image_url"]},"image_url":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"]}},"required":["type","image_url"]}}},"required":["role","content"]},"finish_reason":{"type":"string"}},"required":["index","message","finish_reason"]}},"usage":{"type":"object","properties":{"prompt_tokens":{"type":"number"},"completion_tokens":{"type":"number"},"total_tokens":{"type":"number"},"reasoning_tokens":{"type":"number"},"prompt_tokens_details":{"type":"object","properties":{"cached_tokens":{"type":"number"},"cache_write_tokens":{"type":"number"},"cache_creation_tokens":{"type":"number"},"cache_creation":{"type":"object","properties":{"ephemeral_5m_input_tokens":{"type":"number"},"ephemeral_1h_input_tokens":{"type":"number"}},"required":["ephemeral_5m_input_tokens","ephemeral_1h_input_tokens"]},"audio_tokens":{"type":"number"},"video_tokens":{"type":"number"}},"required":["cached_tokens"]},"completion_tokens_details":{"type":"object","properties":{"reasoning_tokens":{"type":"number"},"image_tokens":{"type":"number"},"audio_tokens":{"type":"number"}}},"info":{"type":"string"}},"required":["prompt_tokens","completion_tokens","total_tokens"]},"metadata":{"type":"object","properties":{"request_id":{"type":"string"},"requested_model":{"type":"string"},"used_model":{"type":"string"},"used_region":{"type":["string","null"]},"underlying_used_model":{"type":"string"},"log_id":{"type":"string"},"organization_id":{"type":"string"},"project_id":{"type":"string"},"cached":{"type":"boolean"}},"required":["request_id","requested_model","used_model","underlying_used_model"]}},"required":["id","object","created","model","choices","usage","metadata"]}},"text/event-stream":{"schema":{}}}},"400":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"401":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"402":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"403":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"404":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"408":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"410":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"413":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"415":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"429":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}},"headers":{"Retry-After":{"schema":{"type":"string"}}}},"500":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"502":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"503":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"504":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"529":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}},"headers":{"Retry-After":{"schema":{"type":"string"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string"},"messages":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["developer","system","user","assistant","tool","function"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"extra_content":{"type":"object","properties":{"google":{"type":"object","properties":{"thought_signature":{"type":"string"}}}}},"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}}}},"required":["type","text"]},{"type":"object","properties":{"type":{"type":"string","enum":["image_url"]},"image_url":{"type":"object","properties":{"url":{"type":"string"},"detail":{"type":"string","enum":["low","high","auto"]}},"required":["url"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}}}},"required":["type","image_url"]},{"type":"object","properties":{"type":{"type":"string","enum":["input_audio"]},"input_audio":{"type":"object","properties":{"data":{"type":"string"},"format":{"type":"string","enum":["wav","mp3","aiff","aac","ogg","flac","m4a","mpeg","mpga","mp4","pcm","webm"]}},"required":["data","format"]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}}}},"required":["type","input_audio"]},{"type":"object","properties":{"type":{"type":"string","enum":["file"]},"file":{"type":"object","properties":{"filename":{"type":"string"},"file_data":{"type":"string"},"file_id":{"type":"string"}}},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","enum":["explicit"]}}}},"required":["type","file"]}]}},{}]},"name":{"type":"string"},"tool_call_id":{"type":"string"},"tool_calls":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"extra_content":{"type":"object","properties":{"google":{"type":"object","properties":{"thought_signature":{"type":"string"}}}}},"function":{"type":"object","properties":{"name":{"type":"string"},"arguments":{"type":"string"}},"required":["name","arguments"]}},"required":["id","type","function"]}},"reasoning":{"type":"string"},"reasoning_content":{"type":"string"},"reasoning_details":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"type":{"type":"string"}}}},"phase":{"type":"string","enum":["commentary","final_answer"]},"content_before_tool_calls":{"type":"boolean"},"message_items":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"phase":{"type":"string","enum":["commentary","final_answer"]},"preceding_tool_calls":{"type":"integer","minimum":0}},"required":["text"]}},"anthropic_native_blocks":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"}},"required":["type"]}},"tool_result_cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]}},"required":["role"]}},"temperature":{"type":["number","null"]},"max_tokens":{"type":["number","null"]},"top_p":{"type":["number","null"]},"frequency_penalty":{"type":["number","null"]},"presence_penalty":{"type":["number","null"]},"response_format":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text","json_object"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["json_schema"]},"json_schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"schema":{"type":"object","additionalProperties":{}},"strict":{"type":"boolean"}},"required":["name","schema"]}},"required":["type","json_schema"]}]},"stream":{"type":"boolean","default":false},"n":{"type":["integer","null"],"minimum":1,"maximum":128},"prompt":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"integer","minimum":1},"label":{"type":"string"},"variables":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}}},"required":["id"]},"prompt_cache_key":{"type":["string","null"]},"prompt_cache_retention":{"type":["string","null"],"enum":["in_memory","24h",null]},"prompt_cache_options":{"type":["object","null"],"properties":{"mode":{"type":"string","enum":["implicit","explicit"]},"ttl":{"type":"string","enum":["30m"]}}},"user":{"type":["string","null"]},"tools":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"parameters":{"type":"object","additionalProperties":{}},"strict":{"type":"boolean"}},"required":["name"]},"allowed_callers":{"type":"array","items":{"type":"string"}},"defer_loading":{"type":"boolean"},"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]}},"required":["type","function"]},{"type":"object","properties":{"type":{"type":"string","enum":["tool_search"]},"tool_search_type":{"type":"string","pattern":"^tool_search_tool"},"name":{"type":"string"}},"required":["type","tool_search_type"]},{"type":"object","properties":{"type":{"type":"string","enum":["web_search"]},"user_location":{"type":"object","properties":{"city":{"type":"string"},"region":{"type":"string"},"country":{"type":"string"},"timezone":{"type":"string"}}},"search_context_size":{"type":"string","enum":["low","medium","high"]},"max_uses":{"type":"number"},"allowed_domains":{"type":"array","items":{"type":"string"}},"blocked_domains":{"type":"array","items":{"type":"string"}}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["web_fetch"]},"web_fetch_type":{"type":"string","pattern":"^web_fetch_"},"name":{"type":"string"},"max_uses":{"type":"integer","exclusiveMinimum":0},"allowed_domains":{"type":"array","items":{"type":"string"}},"blocked_domains":{"type":"array","items":{"type":"string"}},"citations":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"]},"max_content_tokens":{"type":"integer","exclusiveMinimum":0}},"required":["type","web_fetch_type"]}]}},"tool_choice":{"anyOf":[{"type":"string","enum":["auto"]},{"type":"string","enum":["none"]},{"type":"string","enum":["required"]},{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]}},"required":["type","function"]},{"type":"object","properties":{"type":{"type":"string","enum":["web_search"]}},"required":["type"]}]},"parallel_tool_calls":{"type":["boolean","null"]},"reasoning_effort":{"type":["string","null"],"enum":["none","minimal","low","medium","high","xhigh","max",null]},"reasoning":{"type":"object","properties":{"effort":{"type":"string","enum":["none","minimal","low","medium","high","xhigh","max"]},"max_tokens":{"type":"integer","exclusiveMinimum":0},"context":{"type":"string","enum":["auto","current_turn","all_turns"]},"mode":{"type":"string","enum":["standard","pro"]}}},"effort":{"type":["string","null"],"enum":["low","medium","high",null]},"verbosity":{"type":["string","null"],"enum":["low","medium","high",null]},"service_tier":{"type":"string","enum":["auto","default","flex","priority"]},"anthropic_safeguards":{"type":"object","properties":{"safeguards":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"}},"required":["type"]},"minItems":1},"betas":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["safeguards","betas"]},"free_models_only":{"type":"boolean","default":false},"onboarding":{"type":"boolean","default":false,"deprecated":true},"no_reasoning":{"type":"boolean","default":false},"sensitive_word_check":{"type":"object","properties":{"status":{"type":"string","enum":["DISABLE","ENABLE"]}},"required":["status"]},"image_config":{"type":"object","properties":{"aspect_ratio":{"type":"string"},"image_size":{"type":"string"},"image_quality":{"type":"string","enum":["low","medium","high","xhigh","max","auto"]},"moderation":{"type":"string","enum":["auto","low"]},"n":{"type":"number"},"seed":{"type":"number"}}},"web_search_options":{"type":"object","properties":{"search_context_size":{"type":"string","enum":["low","medium","high"]},"user_location":{"type":["object","null"],"properties":{"type":{"type":"string","enum":["approximate"]},"approximate":{"type":"object","properties":{"city":{"type":"string"},"region":{"type":"string"},"country":{"type":"string"},"timezone":{"type":"string"}}}}}}},"web_search":{"type":"boolean","default":false},"plugins":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["response-healing"]}},"required":["id"]}}},"required":["model","messages"]}}}}}},"/v1/embeddings":{"post":{"operationId":"post_v1_embeddings","summary":"Embeddings","tags":["embeddings"],"responses":{"200":{"description":"Successful result.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["embedding"]},"embedding":{"anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string"}]},"index":{"type":"integer"}},"required":["object","embedding","index"]}},"model":{"type":"string"},"usage":{"type":"object","properties":{"prompt_tokens":{"type":"integer"},"total_tokens":{"type":"integer"}},"required":["prompt_tokens","total_tokens"]}}}}}},"400":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"401":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"402":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"403":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"404":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"408":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"410":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"413":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"415":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"429":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}},"headers":{"Retry-After":{"schema":{"type":"string"}}}},"500":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"502":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"503":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"504":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"529":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}},"headers":{"Retry-After":{"schema":{"type":"string"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"integer"}},{"type":"array","items":{"type":"array","items":{"type":"integer"}}}]},"model":{"type":"string"},"encoding_format":{"type":"string","enum":["float","base64"]},"dimensions":{"type":"integer","exclusiveMinimum":0},"user":{"type":"string"}},"required":["input","model"]}}}}}},"/v1/images/generations":{"post":{"operationId":"post_v1_images_generations","summary":"Create image","tags":["images"],"responses":{"200":{"description":"Successful result.","content":{"application/json":{"schema":{"type":"object","properties":{"created":{"type":"number"},"data":{"type":"array","items":{"type":"object","properties":{"b64_json":{"type":"string"},"revised_prompt":{"type":"string"}},"required":["b64_json"]}},"usage":{"type":"object","properties":{"input_tokens":{"type":"number"},"input_tokens_details":{"type":"object","properties":{"image_tokens":{"type":"number"},"text_tokens":{"type":"number"}},"required":["image_tokens","text_tokens"]},"output_tokens":{"type":"number"},"output_tokens_details":{"type":"object","properties":{"image_tokens":{"type":"number"},"text_tokens":{"type":"number"}},"required":["image_tokens","text_tokens"]},"total_tokens":{"type":"number"}},"required":["input_tokens","input_tokens_details","output_tokens","output_tokens_details","total_tokens"]}},"required":["created","data"]}}}},"400":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"401":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"402":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"403":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"404":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"408":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"410":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"413":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"415":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"429":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}},"headers":{"Retry-After":{"schema":{"type":"string"}}}},"500":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"502":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"503":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"504":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"529":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}},"headers":{"Retry-After":{"schema":{"type":"string"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","minLength":1},"model":{"type":"string","default":"auto"},"n":{"type":"integer","minimum":1,"maximum":10,"default":1},"size":{"type":"string"},"quality":{"type":"string","enum":["standard","hd","low","medium","high","xhigh","max","auto"]},"response_format":{"type":"string","enum":["b64_json"],"default":"b64_json"},"style":{"type":"string","enum":["vivid","natural"]},"aspect_ratio":{"type":"string"},"moderation":{"type":"string","enum":["auto","low"]},"service_tier":{"type":"string","enum":["auto","default","flex","priority"]}},"required":["prompt"]}}}}}},"/v1/images/edits":{"post":{"operationId":"post_v1_images_edits","summary":"Edit image","tags":["image-edits"],"responses":{"200":{"description":"Successful result.","content":{"application/json":{"schema":{"type":"object","properties":{"created":{"type":"number"},"data":{"type":"array","items":{"type":"object","properties":{"b64_json":{"type":"string"},"revised_prompt":{"type":"string"}},"required":["b64_json"]}},"usage":{"type":"object","properties":{"input_tokens":{"type":"number"},"input_tokens_details":{"type":"object","properties":{"image_tokens":{"type":"number"},"text_tokens":{"type":"number"}},"required":["image_tokens","text_tokens"]},"output_tokens":{"type":"number"},"output_tokens_details":{"type":"object","properties":{"image_tokens":{"type":"number"},"text_tokens":{"type":"number"}},"required":["image_tokens","text_tokens"]},"total_tokens":{"type":"number"}},"required":["input_tokens","input_tokens_details","output_tokens","output_tokens_details","total_tokens"]},"background":{"type":"string","enum":["transparent","opaque"]},"output_format":{"type":"string","enum":["png","webp","jpeg"]},"quality":{"type":"string","enum":["low","medium","high","xhigh","max"]},"size":{"type":"string"}},"required":["created","data"]}}}},"400":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"401":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"402":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"403":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"404":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"408":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"410":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"413":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"415":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"429":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}},"headers":{"Retry-After":{"schema":{"type":"string"}}}},"500":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"502":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"503":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"504":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"529":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}},"headers":{"Retry-After":{"schema":{"type":"string"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"images":{"type":"array","items":{"type":"object","properties":{"image_url":{"type":"string"}},"required":["image_url"]},"minItems":1,"maxItems":16},"prompt":{"type":"string","minLength":1},"background":{"type":"string","enum":["transparent","opaque","auto"]},"input_fidelity":{"type":"string","enum":["high","low"]},"model":{"type":"string"},"n":{"type":"integer","minimum":1,"maximum":10},"output_compression":{"type":"integer","minimum":0,"maximum":100},"output_format":{"type":"string","enum":["png","jpeg","webp"]},"quality":{"type":"string","enum":["low","medium","high","xhigh","max","auto"]},"size":{"type":"string"},"aspect_ratio":{"type":"string"},"moderation":{"type":"string","enum":["auto","low"]},"service_tier":{"type":"string","enum":["auto","default","flex","priority"]}},"required":["images","prompt"]}},"multipart/form-data":{"schema":{"type":"object","required":["prompt"],"properties":{"model":{"type":"string"},"prompt":{"type":"string"},"image":{"type":"string","format":"binary"},"image[]":{"type":"string","format":"binary"},"file":{"type":"string","format":"binary"},"mask":{"type":"string","format":"binary"},"n":{"type":"integer","minimum":1},"size":{"type":"string"},"quality":{"type":"string"},"background":{"type":"string"},"input_fidelity":{"type":"string"},"output_format":{"type":"string"},"output_compression":{"type":"integer"}},"anyOf":[{"required":["image"]},{"required":["image[]"]},{"required":["file"]}]}}}},"description":"JSON image URLs or multipart upload; the first image file is consumed. Model-dependent sizes and formats."}},"/v1/moderations":{"post":{"operationId":"post_v1_moderations","summary":"Moderations","tags":["moderations"],"responses":{"200":{"description":"Successful result.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"model":{"type":"string"},"results":{"type":"array","items":{"type":"object","properties":{"flagged":{"type":"boolean"},"categories":{"type":"object","additionalProperties":{"type":"boolean"}},"category_scores":{"type":"object","additionalProperties":{"type":"number"}},"category_applied_input_types":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}},"required":["flagged"]}}}}}}},"400":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"401":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"402":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"403":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"404":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"408":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"410":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"413":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"415":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"429":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}},"headers":{"Retry-After":{"schema":{"type":"string"}}}},"500":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"502":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"503":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"504":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"529":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}},"headers":{"Retry-After":{"schema":{"type":"string"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url"]},"text":{"type":"string"},"image_url":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"]}},"required":["type"]}}]},"model":{"type":"string","default":"omni-moderation-latest"}},"required":["input"]}}}}}},"/v1/ocr":{"post":{"operationId":"post_v1_ocr","summary":"OCR","tags":["ocr"],"responses":{"200":{"description":"Successful result.","content":{"application/json":{"schema":{"type":"object","properties":{"pages":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"markdown":{"type":"string"},"images":{"type":"array","items":{"type":"object","additionalProperties":{}}},"dimensions":{"type":["object","null"],"additionalProperties":{}}}}},"model":{"type":"string"},"document_annotation":{"type":["string","null"]},"usage_info":{"type":"object","properties":{"pages_processed":{"type":"integer"},"doc_size_bytes":{"type":["integer","null"]}}}}}}}},"400":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"401":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"402":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"403":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"404":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"408":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"410":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"413":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"415":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"429":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}},"headers":{"Retry-After":{"schema":{"type":"string"}}}},"500":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"502":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"503":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"504":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"529":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}},"headers":{"Retry-After":{"schema":{"type":"string"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string"},"document":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["document_url"]},"document_url":{"type":"string"},"document_name":{"type":"string"}},"required":["type","document_url"]},{"type":"object","properties":{"type":{"type":"string","enum":["image_url"]},"image_url":{"anyOf":[{"type":"string"},{"type":"object","properties":{"url":{"type":"string"}},"required":["url"]}]}},"required":["type","image_url"]}]},"id":{"type":"string"},"pages":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"string"}]},"include_image_base64":{"type":"boolean"},"image_limit":{"type":"integer"},"image_min_size":{"type":"integer"},"bbox_annotation_format":{"type":"object","additionalProperties":{}},"document_annotation_format":{"type":"object","additionalProperties":{}}},"required":["model","document"]}}}}}},"/v1/rerank":{"post":{"operationId":"post_v1_rerank","summary":"Rerank","tags":["rerank"],"responses":{"200":{"description":"Successful result.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"model":{"type":"string"},"results":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"relevance_score":{"type":"number"},"document":{"type":"string"}},"required":["index","relevance_score"]}},"meta":{"type":"object","properties":{"api_version":{"type":"object","properties":{"version":{"type":"string"}}},"billed_units":{"type":"object","properties":{"input_tokens":{"type":"integer"},"total_tokens":{"type":"integer"}}}}}},"required":["model","results"]}}}},"400":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"401":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"402":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"403":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"404":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"408":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"410":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"413":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"415":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"429":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}},"headers":{"Retry-After":{"schema":{"type":"string"}}}},"500":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"502":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"503":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"504":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"529":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}},"headers":{"Retry-After":{"schema":{"type":"string"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string"},"query":{"type":"string","minLength":1},"documents":{"type":"array","items":{"type":"string"},"minItems":1},"top_n":{"type":"integer","exclusiveMinimum":0},"return_documents":{"type":"boolean"},"max_chunks_per_doc":{"type":"integer","exclusiveMinimum":0}},"required":["model","query","documents"]}}}}}},"/v1/search":{"post":{"operationId":"post_v1_search","summary":"Search","tags":["search"],"responses":{"200":{"description":"Successful result.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"model":{"type":"string"},"results":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"url":{"type":"string"},"snippet":{"type":"string"},"date":{"type":["string","null"]},"last_updated":{"type":["string","null"]}},"required":["title","url"]}},"server_time":{"type":["string","null"]}},"required":["model","results"]}}}},"400":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"401":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"402":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"403":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"404":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"408":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"410":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"413":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"415":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"429":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}},"headers":{"Retry-After":{"schema":{"type":"string"}}}},"500":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"502":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"503":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"504":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"529":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}},"headers":{"Retry-After":{"schema":{"type":"string"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string"},"query":{"anyOf":[{"type":"string","minLength":1},{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"maxItems":5}]},"search_type":{"type":"string","enum":["web","fast","people"]},"max_results":{"type":"integer","minimum":1,"maximum":50},"max_tokens":{"type":"integer","exclusiveMinimum":0,"maximum":1000000},"max_tokens_per_page":{"type":"integer","exclusiveMinimum":0,"maximum":1000000},"search_context_size":{"type":"string","enum":["low","medium","high"]},"country":{"type":"string","minLength":2,"maxLength":2},"search_language_filter":{"type":"array","items":{"type":"string"},"maxItems":20},"search_domain_filter":{"type":"array","items":{"type":"string"},"maxItems":20},"search_recency_filter":{"type":"string","enum":["hour","day","week","month","year"]},"search_after_date_filter":{"type":"string","pattern":"^\\d{1,2}\\/\\d{1,2}\\/\\d{4}$"},"search_before_date_filter":{"type":"string","pattern":"^\\d{1,2}\\/\\d{1,2}\\/\\d{4}$"},"last_updated_after_filter":{"type":"string","pattern":"^\\d{1,2}\\/\\d{1,2}\\/\\d{4}$"},"last_updated_before_filter":{"type":"string","pattern":"^\\d{1,2}\\/\\d{1,2}\\/\\d{4}$"}},"required":["query"]}}}}}},"/v1/decisions":{"post":{"operationId":"post_v1_decisions","summary":"Decisions","tags":["decisions"],"responses":{"200":{"description":"Successful result.","content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string"},"answers":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["predicate","choice","score","refusal"]},"name":{"type":["string","null"]},"probability":{"type":"number"},"choice":{"anyOf":[{"type":"string"},{"type":"boolean"}]},"score":{"type":"number"},"probabilities":{"type":"array","items":{"type":"object","properties":{"value":{"anyOf":[{"type":"string"},{"type":"boolean"},{"type":"number"}]},"label":{"type":"string"},"probability":{"type":"number"}},"required":["value","probability"]}},"confidence":{"type":"number"}},"required":["type"]}},"usage":{"type":"object","properties":{"input_tokens":{"type":"integer"},"output_tokens":{"type":"integer"},"total_tokens":{"type":"integer"}},"required":["input_tokens","output_tokens","total_tokens"]}},"required":["model","answers"]}}}},"400":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"401":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"402":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"403":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"404":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"408":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"410":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"413":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"415":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"429":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}},"headers":{"Retry-After":{"schema":{"type":"string"}}}},"500":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"502":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"503":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"504":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"529":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}},"headers":{"Retry-After":{"schema":{"type":"string"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["message"]},"role":{"type":"string","enum":["user"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["input_text"]},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"type":{"type":"string","enum":["input_image"]},"image_url":{"type":"string"},"detail":{"type":["string","null"],"enum":["low","high","auto","original",null]}},"required":["type","image_url"]}]}}]}},"required":["role","content"]}}]},"questions":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["predicate"]},"name":{"type":"string"},"instructions":{"type":"string"}},"required":["type","instructions"]},{"type":"object","properties":{"type":{"type":"string","enum":["choice"]},"name":{"type":"string"},"instructions":{"type":"string"},"choices":{"type":"array","items":{"type":"object","properties":{"value":{"anyOf":[{"type":"string"},{"type":"boolean"}]},"description":{"type":"string"}},"required":["value"]},"minItems":2,"maxItems":255}},"required":["type","instructions","choices"]},{"type":"object","properties":{"type":{"type":"string","enum":["score"]},"name":{"type":"string"},"instructions":{"type":"string"},"levels":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"description":{"type":"string"}},"required":["label"]},"minItems":2}},"required":["type","instructions","levels"]}]},"minItems":1},"safety_identifier":{"type":["string","null"],"maxLength":128}},"required":["model","input","questions"]}}}}}},"/v1/messages":{"post":{"operationId":"post_v1_messages","summary":"Anthropic Messages","tags":["messages"],"responses":{"200":{"description":"Successful result.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["message"]},"role":{"type":"string","enum":["assistant"]},"model":{"type":"string"},"content":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["text","tool_use","thinking","redacted_thinking","server_tool_use","web_search_tool_result","web_fetch_tool_result","tool_search_tool_result"]},"text":{"type":"string"},"citations":{"type":["array","null"],"items":{"type":"object","additionalProperties":{}}},"thinking":{"type":"string"},"signature":{"type":"string"},"data":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"input":{"type":"object","additionalProperties":{}},"tool_use_id":{"type":"string"},"content":{"anyOf":[{"type":"array","items":{}},{"type":"object","additionalProperties":{}}]}},"required":["type"]}},"stop_reason":{"type":["string","null"],"enum":["end_turn","max_tokens","stop_sequence","tool_use","pause_turn","refusal",null]},"stop_sequence":{"type":["string","null"]},"usage":{"type":"object","properties":{"input_tokens":{"type":"number"},"output_tokens":{"type":"number"},"cache_creation_input_tokens":{"type":"number","default":0},"cache_read_input_tokens":{"type":"number","default":0},"cache_creation":{"type":"object","properties":{"ephemeral_5m_input_tokens":{"type":"number"},"ephemeral_1h_input_tokens":{"type":"number"}},"required":["ephemeral_5m_input_tokens","ephemeral_1h_input_tokens"]},"server_tool_use":{"type":"object","properties":{"web_search_requests":{"type":"number"},"web_fetch_requests":{"type":"number"}},"required":["web_search_requests"]}},"required":["input_tokens","output_tokens"]},"metadata":{"type":"object","additionalProperties":{}},"safeguard_results":{"type":"array","items":{"type":"object","additionalProperties":{}}}},"required":["id","type","role","model","content","stop_reason","stop_sequence","usage"]}},"text/event-stream":{"schema":{"type":"string"}}}},"400":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicError"}}}},"401":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicError"}}}},"402":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicError"}}}},"403":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicError"}}}},"404":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicError"}}}},"408":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicError"}}}},"410":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicError"}}}},"413":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicError"}}}},"415":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicError"}}}},"429":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicError"}}},"headers":{"Retry-After":{"schema":{"type":"string"}}}},"500":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicError"}}}},"502":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicError"}}}},"503":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicError"}}}},"504":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicError"}}}},"529":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicError"}}},"headers":{"Retry-After":{"schema":{"type":"string"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string"},"messages":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["system","developer","user","assistant","tool","function"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]}},"required":["type","text"]},{"type":"object","properties":{"type":{"type":"string","enum":["image"]},"source":{"type":"object","properties":{"type":{"type":"string","enum":["base64"]},"media_type":{"type":"string"},"data":{"type":"string"}},"required":["type","media_type","data"]}},"required":["type","source"]},{"type":"object","properties":{"type":{"type":"string","enum":["tool_use"]},"id":{"type":"string"},"name":{"type":"string"},"input":{"type":"object","additionalProperties":{}}},"required":["type","id","name","input"]},{"type":"object","properties":{"type":{"type":"string","enum":["tool_result"]},"tool_use_id":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{}}]},"is_error":{"type":"boolean"},"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]}},"required":["type","tool_use_id"]},{"type":"object","properties":{"type":{"type":"string","enum":["thinking"]},"thinking":{"type":"string"},"signature":{"type":"string"}},"required":["type","thinking"]},{"type":"object","properties":{"type":{"type":"string","enum":["redacted_thinking"]},"data":{"type":"string"}},"required":["type","data"]},{"type":"object","properties":{"type":{"type":"string","enum":["server_tool_use"]},"id":{"type":"string"},"name":{"type":"string"},"input":{"type":"object","additionalProperties":{}}},"required":["type","id","name"]},{"type":"object","properties":{"type":{"type":"string","enum":["web_search_tool_result"]},"tool_use_id":{"type":"string"},"content":{"anyOf":[{"type":"array","items":{}},{"type":"object","additionalProperties":{}}]}},"required":["type","tool_use_id"]},{"type":"object","properties":{"type":{"type":"string","enum":["web_fetch_tool_result"]},"tool_use_id":{"type":"string"},"content":{"type":"object","additionalProperties":{}}},"required":["type","tool_use_id"]},{"type":"object","properties":{"type":{"type":"string","enum":["tool_search_tool_result"]},"tool_use_id":{"type":"string"},"content":{"type":"object","additionalProperties":{}}},"required":["type","tool_use_id"]},{"type":"object","properties":{"type":{"type":"string","enum":["tool_addition","tool_removal"]},"tool":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["tool_reference"]},"name":{"type":"string"}},"required":["type","name"]},{"type":"object","properties":{"type":{"type":"string","enum":["tool_definition"]},"definition":{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"name":{"type":"string"},"description":{"type":"string"},"input_schema":{"type":"object","additionalProperties":{}},"cache_control":{"type":["object","null"],"properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"defer_loading":{"type":"boolean"},"strict":{"type":"boolean"},"allowed_callers":{"type":"array","items":{"type":"string"}}},"required":["name","input_schema"]}},"required":["type","definition"]}]},"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]}},"required":["type","tool"]},{"type":"object","properties":{"type":{"type":"string"}},"required":["type"]}]}}]},"tool_call_id":{"type":"string"},"name":{"type":"string"},"tool_calls":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"name":{"type":"string"},"arguments":{"type":"string"}},"required":["name","arguments"]}},"required":["id","type","function"]}},"function_call":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"arguments":{"anyOf":[{"type":"string"},{"type":"object","additionalProperties":{}}]}},"required":["name","arguments"]}},"required":["role","content"]}},"max_tokens":{"type":"number","minimum":1},"system":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]}},"required":["type","text"]}}]},"temperature":{"type":"number","minimum":0,"maximum":1},"tools":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"name":{"type":"string"},"description":{"type":"string"},"input_schema":{"type":"object","additionalProperties":{}},"cache_control":{"type":["object","null"],"properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]},"defer_loading":{"type":"boolean"},"strict":{"type":"boolean"},"allowed_callers":{"type":"array","items":{"type":"string"}}},"required":["name","input_schema"]},{"type":"object","properties":{"type":{"type":"string","pattern":"^tool_search_tool"},"name":{"type":"string"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string"},"name":{"type":"string"},"max_uses":{"type":"number"},"allowed_domains":{"type":"array","items":{"type":"string"}},"blocked_domains":{"type":"array","items":{"type":"string"}},"citations":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"]},"max_content_tokens":{"type":"integer","exclusiveMinimum":0},"user_location":{"type":"object","properties":{"type":{"type":"string","enum":["approximate"]},"city":{"type":"string"},"region":{"type":"string"},"country":{"type":"string"},"timezone":{"type":"string"}}},"cache_control":{"type":["object","null"],"properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"]}},"required":["type","name"]}]}},"tool_choice":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["auto"]},"disable_parallel_tool_use":{"type":"boolean"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["any"]},"disable_parallel_tool_use":{"type":"boolean"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["tool"]},"name":{"type":"string"},"disable_parallel_tool_use":{"type":"boolean"}},"required":["type","name"]},{"type":"object","properties":{"type":{"type":"string","enum":["none"]}},"required":["type"]},{}]},"stream":{"type":"boolean","default":false},"metadata":{"type":"object","properties":{"user_id":{"type":"string"}}},"thinking":{"type":"object","properties":{"type":{"type":"string"},"budget_tokens":{"type":"integer","exclusiveMinimum":0}},"required":["type"]},"output_config":{"type":"object","properties":{"effort":{"type":"string","enum":["none","minimal","low","medium","high","xhigh","max"]}}},"safeguards":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"}},"required":["type"]}}},"required":["model","messages","max_tokens"]}}}}}},"/v1/audio/speech":{"post":{"operationId":"post_v1_audio_speech","summary":"Create speech","tags":["speech"],"responses":{"200":{"description":"Successful result.","content":{"audio/wav":{"schema":{"type":"string","format":"binary"}},"audio/mpeg":{"schema":{"type":"string","format":"binary"}},"application/octet-stream":{"schema":{"type":"string","format":"binary"}},"audio/opus":{"schema":{"type":"string","format":"binary"}},"audio/aac":{"schema":{"type":"string","format":"binary"}},"audio/flac":{"schema":{"type":"string","format":"binary"}},"audio/pcm":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"401":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"402":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"403":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"404":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"408":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"410":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"413":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"415":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"429":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}},"headers":{"Retry-After":{"schema":{"type":"string"}}}},"500":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"502":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"503":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"504":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"529":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}},"headers":{"Retry-After":{"schema":{"type":"string"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string"},"input":{"type":"string","minLength":1},"voice":{"type":"string"},"response_format":{"type":"string","enum":["wav","pcm","mp3","opus","aac","flac"]},"speed":{"type":"number","minimum":0.25,"maximum":4},"instructions":{"type":"string"}},"required":["model","input"]}}}}}},"/v1/audio/transcriptions":{"post":{"operationId":"post_v1_audio_transcriptions","summary":"Create transcription","tags":["transcriptions"],"responses":{"200":{"description":"Successful result.","content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string"},"language":{"type":"string"},"duration":{"type":"number"},"words":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"start":{"type":"number"},"end":{"type":"number"},"speaker":{"type":"number"}}}},"channels":{"type":"array","items":{"type":"object","additionalProperties":{}}}}}}}},"400":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"401":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"402":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"403":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"404":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"408":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"410":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"413":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"415":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"429":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}},"headers":{"Retry-After":{"schema":{"type":"string"}}}},"500":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"502":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"503":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"504":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"529":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}},"headers":{"Retry-After":{"schema":{"type":"string"}}}}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"model":{"type":"string"},"file":{"type":"string","format":"binary"},"url":{"type":"string"},"language":{"type":"string"},"diarize":{"type":"string"},"filler_words":{"type":"string"},"keyterm":{"type":"string"}},"required":["model"],"anyOf":[{"required":["file"]},{"required":["url"]}]}}}}}},"/v1/videos":{"post":{"operationId":"post_v1_videos","summary":"Create video","tags":["videos"],"responses":{"200":{"description":"Successful result.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","enum":["video"]},"model":{"type":"string"},"status":{"type":"string","enum":["queued","in_progress","completed","failed","canceled","expired"]},"progress":{"type":["integer","null"],"minimum":0,"maximum":100},"created_at":{"type":"number"},"completed_at":{"type":["number","null"]},"expires_at":{"type":["number","null"]},"error":{"type":["object","null"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"]},"content":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["video"]},"url":{"type":"string","format":"uri-reference"},"mime_type":{"type":["string","null"]}},"required":["type","url"]}},"usage":{"type":"object","properties":{},"required":[]}},"required":["id","object","model","status","progress","created_at","completed_at","expires_at","error"]}}}},"400":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"401":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"402":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"403":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"404":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"408":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"410":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"413":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"415":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"429":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}},"headers":{"Retry-After":{"schema":{"type":"string"}}}},"500":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"502":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"503":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"504":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"529":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}},"headers":{"Retry-After":{"schema":{"type":"string"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string","default":"veo-3.1-generate-preview"},"prompt":{"type":"string","minLength":1},"size":{"type":"string"},"callback_secret":{"type":"string","minLength":1},"input_reference":{"anyOf":[{"type":"string"},{"type":"object","properties":{"image_url":{"type":"string"}},"required":["image_url"]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"object","properties":{"image_url":{"type":"string"}},"required":["image_url"]}]},"minItems":1,"maxItems":9}]},"last_frame":{"anyOf":[{"type":"string"},{"type":"object","properties":{"image_url":{"type":"string"}},"required":["image_url"]}]},"seconds":{"type":"integer","minimum":1},"audio":{"type":"boolean","default":true},"n":{"type":"integer"},"image":{"anyOf":[{"type":"string"},{"type":"object","properties":{"image_url":{"type":"string"}},"required":["image_url"]}]},"reference_images":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"object","properties":{"image_url":{"type":"string"}},"required":["image_url"]}]},"minItems":1,"maxItems":9},"reference_videos":{"type":"array","items":{"anyOf":[{"type":"string","format":"uri"},{"type":"object","properties":{"video_url":{"type":"string","format":"uri"}},"required":["video_url"]}]},"minItems":1,"maxItems":3},"video":{"anyOf":[{"type":"string","format":"uri"},{"type":"object","properties":{"video_url":{"type":"string","format":"uri"}},"required":["video_url"]}]},"video_task":{"type":"string","enum":["edit","extend"]},"reference_audios":{"type":"array","items":{"anyOf":[{"type":"string","format":"uri"},{"type":"object","properties":{"audio_url":{"type":"string","format":"uri"}},"required":["audio_url"]}]},"minItems":1,"maxItems":3}},"required":["prompt","seconds"]}}}}}},"/v1/videos/{video_id}":{"get":{"operationId":"get_v1_videos_video_id","summary":"Retrieve video","tags":["videos"],"responses":{"200":{"description":"Successful result.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","enum":["video"]},"model":{"type":"string"},"status":{"type":"string","enum":["queued","in_progress","completed","failed","canceled","expired"]},"progress":{"type":["integer","null"],"minimum":0,"maximum":100},"created_at":{"type":"number"},"completed_at":{"type":["number","null"]},"expires_at":{"type":["number","null"]},"error":{"type":["object","null"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"]},"content":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["video"]},"url":{"type":"string","format":"uri-reference"},"mime_type":{"type":["string","null"]}},"required":["type","url"]}},"usage":{"type":"object","properties":{},"required":[]}},"required":["id","object","model","status","progress","created_at","completed_at","expires_at","error"]}}}},"400":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"401":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"402":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"403":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"404":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"408":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"410":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"413":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"415":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"429":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}},"headers":{"Retry-After":{"schema":{"type":"string"}}}},"500":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"502":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"503":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"504":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"529":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}},"headers":{"Retry-After":{"schema":{"type":"string"}}}}},"parameters":[{"schema":{"type":"string"},"required":true,"name":"video_id","in":"path"}]},"head":{"operationId":"head__v1_videos_video_id_","summary":"Read project-owned resource headers","tags":["videos"],"responses":{"200":{"description":"Successful result."},"400":{"description":"Request refused or could not complete."},"401":{"description":"Request refused or could not complete."},"402":{"description":"Request refused or could not complete."},"403":{"description":"Request refused or could not complete."},"404":{"description":"Request refused or could not complete."},"408":{"description":"Request refused or could not complete."},"410":{"description":"Request refused or could not complete."},"413":{"description":"Request refused or could not complete."},"415":{"description":"Request refused or could not complete."},"429":{"description":"Request refused or could not complete.","headers":{"Retry-After":{"schema":{"type":"string"}}}},"500":{"description":"Request refused or could not complete."},"502":{"description":"Request refused or could not complete."},"503":{"description":"Request refused or could not complete."},"504":{"description":"Request refused or could not complete."},"529":{"description":"Request refused or could not complete.","headers":{"Retry-After":{"schema":{"type":"string"}}}}},"parameters":[{"schema":{"type":"string"},"required":true,"name":"video_id","in":"path"}]}},"/v1/videos/logs/{log_id}/content":{"get":{"operationId":"get_v1_videos_logs_log_id_content","summary":"Video log content","tags":["videos"],"responses":{"200":{"description":"Successful result.","content":{"video/mp4":{"schema":{}},"application/octet-stream":{"schema":{}}}},"206":{"description":"Successful result.","content":{"video/mp4":{"schema":{"type":"string","format":"binary"}},"application/octet-stream":{"schema":{"type":"string","format":"binary"}}},"headers":{"Content-Range":{"schema":{"type":"string"}},"Accept-Ranges":{"schema":{"type":"string"}}}},"400":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"401":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"402":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"403":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"404":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"408":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"410":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"413":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"415":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"416":{"description":"Request refused or could not complete.","headers":{"Content-Range":{"schema":{"type":"string"}}}},"429":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}},"headers":{"Retry-After":{"schema":{"type":"string"}}}},"500":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"502":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"503":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"504":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"529":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}},"headers":{"Retry-After":{"schema":{"type":"string"}}}}},"parameters":[{"schema":{"type":"string"},"required":true,"name":"log_id","in":"path"},{"schema":{"type":"string","minLength":1},"required":false,"name":"token","in":"query"},{"schema":{"type":"string"},"required":false,"name":"range","in":"header"},{"schema":{"type":"string"},"required":false,"name":"if-range","in":"header"}]},"head":{"operationId":"head__v1_videos_logs_log_id_content","summary":"Read project-owned resource headers","tags":["videos"],"responses":{"200":{"description":"Successful result."},"206":{"description":"Successful result.","headers":{"Content-Range":{"schema":{"type":"string"}},"Accept-Ranges":{"schema":{"type":"string"}}}},"400":{"description":"Request refused or could not complete."},"401":{"description":"Request refused or could not complete."},"402":{"description":"Request refused or could not complete."},"403":{"description":"Request refused or could not complete."},"404":{"description":"Request refused or could not complete."},"408":{"description":"Request refused or could not complete."},"410":{"description":"Request refused or could not complete."},"413":{"description":"Request refused or could not complete."},"415":{"description":"Request refused or could not complete."},"416":{"description":"Request refused or could not complete.","headers":{"Content-Range":{"schema":{"type":"string"}}}},"429":{"description":"Request refused or could not complete.","headers":{"Retry-After":{"schema":{"type":"string"}}}},"500":{"description":"Request refused or could not complete."},"502":{"description":"Request refused or could not complete."},"503":{"description":"Request refused or could not complete."},"504":{"description":"Request refused or could not complete."},"529":{"description":"Request refused or could not complete.","headers":{"Retry-After":{"schema":{"type":"string"}}}}},"parameters":[{"schema":{"type":"string"},"required":true,"name":"log_id","in":"path"},{"schema":{"type":"string","minLength":1},"required":false,"name":"token","in":"query"},{"schema":{"type":"string"},"required":false,"name":"range","in":"header"},{"schema":{"type":"string"},"required":false,"name":"if-range","in":"header"}]}},"/v1/videos/{video_id}/content":{"get":{"operationId":"get_v1_videos_video_id_content","summary":"Video content","tags":["videos"],"responses":{"200":{"description":"Successful result.","content":{"video/mp4":{"schema":{}},"application/octet-stream":{"schema":{}}}},"206":{"description":"Successful result.","content":{"video/mp4":{"schema":{"type":"string","format":"binary"}},"application/octet-stream":{"schema":{"type":"string","format":"binary"}}},"headers":{"Content-Range":{"schema":{"type":"string"}},"Accept-Ranges":{"schema":{"type":"string"}}}},"400":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"401":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"402":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"403":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"404":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"408":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"410":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"413":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"415":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"416":{"description":"Request refused or could not complete.","headers":{"Content-Range":{"schema":{"type":"string"}}}},"429":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}},"headers":{"Retry-After":{"schema":{"type":"string"}}}},"500":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"502":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"503":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"504":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"529":{"description":"Request refused or could not complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}},"headers":{"Retry-After":{"schema":{"type":"string"}}}}},"parameters":[{"schema":{"type":"string"},"required":true,"name":"video_id","in":"path"},{"schema":{"type":"string"},"required":false,"name":"range","in":"header"},{"schema":{"type":"string"},"required":false,"name":"if-range","in":"header"}]},"head":{"operationId":"head__v1_videos_video_id_content","summary":"Read project-owned resource headers","tags":["videos"],"responses":{"200":{"description":"Successful result."},"206":{"description":"Successful result.","headers":{"Content-Range":{"schema":{"type":"string"}},"Accept-Ranges":{"schema":{"type":"string"}}}},"400":{"description":"Request refused or could not complete."},"401":{"description":"Request refused or could not complete."},"402":{"description":"Request refused or could not complete."},"403":{"description":"Request refused or could not complete."},"404":{"description":"Request refused or could not complete."},"408":{"description":"Request refused or could not complete."},"410":{"description":"Request refused or could not complete."},"413":{"description":"Request refused or could not complete."},"415":{"description":"Request refused or could not complete."},"416":{"description":"Request refused or could not complete.","headers":{"Content-Range":{"schema":{"type":"string"}}}},"429":{"description":"Request refused or could not complete.","headers":{"Retry-After":{"schema":{"type":"string"}}}},"500":{"description":"Request refused or could not complete."},"502":{"description":"Request refused or could not complete."},"503":{"description":"Request refused or could not complete."},"504":{"description":"Request refused or could not complete."},"529":{"description":"Request refused or could not complete.","headers":{"Retry-After":{"schema":{"type":"string"}}}}},"parameters":[{"schema":{"type":"string"},"required":true,"name":"video_id","in":"path"},{"schema":{"type":"string"},"required":false,"name":"range","in":"header"},{"schema":{"type":"string"},"required":false,"name":"if-range","in":"header"}]}},"/v1/models":{"get":{"operationId":"get_v1_models","summary":"List canonical models available to this caller","security":[{},{"ApiKeyBearer":[]},{"ApiKeyHeader":[]}],"parameters":[{"name":"mapped","in":"query","required":false,"schema":{"type":"boolean","enum":[false]}},{"name":"include_restricted","in":"query","required":false,"schema":{"type":"boolean","enum":[false]}},{"name":"include_deactivated","in":"query","required":false,"schema":{"type":"boolean","enum":[false]}},{"name":"exclude_deprecated","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"no_training","in":"query","required":false,"schema":{"type":"boolean","enum":[false]}}],"description":"Public model creators are not serving-provider disclosures. Non-false mapped/restricted/deactivated/no_training filters are explicitly rejected; invalid supplied credentials fail. Authenticated discovery is private.","responses":{"200":{"description":"Successful result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Models"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid or missing credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credit or allowance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not permitted for this project or plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unavailable model or project-owned resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation cannot safely complete right now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/key":{"get":{"operationId":"get_v1_key","summary":"Read local project or organization account information","responses":{"200":{"description":"Successful result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Key"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid or missing credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credit or allowance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not permitted for this project or plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unavailable model or project-owned resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation cannot safely complete right now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/credits":{"get":{"operationId":"get_v1_credits","summary":"Read local project or organization account information","responses":{"200":{"description":"Successful result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Credits"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid or missing credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credit or allowance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not permitted for this project or plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unavailable model or project-owned resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation cannot safely complete right now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/responses":{"post":{"operationId":"post_v1_responses","summary":"Create a Responses result","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponsesRequest"}}}},"responses":{"200":{"description":"JSON or Responses SSE when stream is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}},"text/event-stream":{"schema":{"type":"string"},"x-event-schema":{"$ref":"#/components/schemas/ResponseEvent"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid or missing credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credit or allowance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not permitted for this project or plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unavailable model or project-owned resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation cannot safely complete right now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-streaming":"optional","x-intentional-differences":["Only advertised models, tools and project-owned prior responses are available.","Registration is not evidence that a particular model/format has completed integration or smoke verification."]}},"/v1/responses/compact":{"post":{"operationId":"post_v1_responses_compact","summary":"Compact Responses input","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponsesCompactRequest"}}}},"responses":{"200":{"description":"Successful result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompactedResponse"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid or missing credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credit or allowance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not permitted for this project or plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unavailable model or project-owned resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation cannot safely complete right now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/responses/{response_id}":{"get":{"operationId":"get_v1_responses_response_id","summary":"Retrieve a project-owned stored response","parameters":[{"name":"response_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":256}}],"responses":{"200":{"description":"Successful result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid or missing credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credit or allowance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not permitted for this project or plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unavailable model or project-owned resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation cannot safely complete right now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"head":{"operationId":"head__v1_responses_response_id_","summary":"Read project-owned resource headers","parameters":[{"name":"response_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":256}}],"responses":{"200":{"description":"Successful result."},"400":{"description":"Invalid request."},"401":{"description":"Invalid or missing credentials."},"402":{"description":"Insufficient credit or allowance."},"403":{"description":"Not permitted for this project or plan."},"404":{"description":"Unavailable model or project-owned resource."},"429":{"description":"Rate limited."},"503":{"description":"The operation cannot safely complete right now."}}}},"/v1/ai/config":{"get":{"operationId":"get_v1_ai_config","summary":"List local canonical AI SDK language models","responses":{"200":{"description":"Successful result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SdkConfig"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid or missing credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credit or allowance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not permitted for this project or plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unavailable model or project-owned resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation cannot safely complete right now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/ai/language-model":{"post":{"operationId":"post_v1_ai_language_model","summary":"Call the versioned AI SDK language-model protocol","parameters":[{"name":"ai-language-model-id","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":256}},{"name":"ai-language-model-streaming","in":"header","required":false,"schema":{"type":"string","enum":["true","false"],"default":"false"}},{"name":"ai-language-model-specification-version","in":"header","required":false,"schema":{"type":"string","enum":["2","3","4"],"default":"4"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SdkRequest"}}}},"responses":{"200":{"description":"JSON generation or SSE protocol parts. Version 2 has flat usage; versions 3 and 4 have nested usage.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SdkResult"}},"text/event-stream":{"schema":{"type":"string"},"x-event-schema":{"$ref":"#/components/schemas/SdkEvent"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid or missing credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credit or allowance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not permitted for this project or plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unavailable model or project-owned resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation cannot safely complete right now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-intentional-differences":["URL prefix does not choose specification version; missing or unrecognized version headers fall back to 4.","Unsupported native tools and providerOptions produce typed warnings; they are not advertised as implemented."]}},"/v2/ai/config":{"get":{"operationId":"get_v2_ai_config","summary":"List local canonical AI SDK language models","responses":{"200":{"description":"Successful result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SdkConfig"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid or missing credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credit or allowance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not permitted for this project or plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unavailable model or project-owned resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation cannot safely complete right now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v2/ai/language-model":{"post":{"operationId":"post_v2_ai_language_model","summary":"Call the versioned AI SDK language-model protocol","parameters":[{"name":"ai-language-model-id","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":256}},{"name":"ai-language-model-streaming","in":"header","required":false,"schema":{"type":"string","enum":["true","false"],"default":"false"}},{"name":"ai-language-model-specification-version","in":"header","required":false,"schema":{"type":"string","enum":["2","3","4"],"default":"4"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SdkRequest"}}}},"responses":{"200":{"description":"JSON generation or SSE protocol parts. Version 2 has flat usage; versions 3 and 4 have nested usage.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SdkResult"}},"text/event-stream":{"schema":{"type":"string"},"x-event-schema":{"$ref":"#/components/schemas/SdkEvent"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid or missing credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credit or allowance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not permitted for this project or plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unavailable model or project-owned resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation cannot safely complete right now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-intentional-differences":["URL prefix does not choose specification version; missing or unrecognized version headers fall back to 4.","Unsupported native tools and providerOptions produce typed warnings; they are not advertised as implemented."]}},"/v3/ai/config":{"get":{"operationId":"get_v3_ai_config","summary":"List local canonical AI SDK language models","responses":{"200":{"description":"Successful result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SdkConfig"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid or missing credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credit or allowance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not permitted for this project or plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unavailable model or project-owned resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation cannot safely complete right now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v3/ai/language-model":{"post":{"operationId":"post_v3_ai_language_model","summary":"Call the versioned AI SDK language-model protocol","parameters":[{"name":"ai-language-model-id","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":256}},{"name":"ai-language-model-streaming","in":"header","required":false,"schema":{"type":"string","enum":["true","false"],"default":"false"}},{"name":"ai-language-model-specification-version","in":"header","required":false,"schema":{"type":"string","enum":["2","3","4"],"default":"4"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SdkRequest"}}}},"responses":{"200":{"description":"JSON generation or SSE protocol parts. Version 2 has flat usage; versions 3 and 4 have nested usage.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SdkResult"}},"text/event-stream":{"schema":{"type":"string"},"x-event-schema":{"$ref":"#/components/schemas/SdkEvent"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid or missing credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credit or allowance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not permitted for this project or plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unavailable model or project-owned resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation cannot safely complete right now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-intentional-differences":["URL prefix does not choose specification version; missing or unrecognized version headers fall back to 4.","Unsupported native tools and providerOptions produce typed warnings; they are not advertised as implemented."]}},"/v4/ai/config":{"get":{"operationId":"get_v4_ai_config","summary":"List local canonical AI SDK language models","responses":{"200":{"description":"Successful result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SdkConfig"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid or missing credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credit or allowance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not permitted for this project or plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unavailable model or project-owned resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation cannot safely complete right now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v4/ai/language-model":{"post":{"operationId":"post_v4_ai_language_model","summary":"Call the versioned AI SDK language-model protocol","parameters":[{"name":"ai-language-model-id","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":256}},{"name":"ai-language-model-streaming","in":"header","required":false,"schema":{"type":"string","enum":["true","false"],"default":"false"}},{"name":"ai-language-model-specification-version","in":"header","required":false,"schema":{"type":"string","enum":["2","3","4"],"default":"4"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SdkRequest"}}}},"responses":{"200":{"description":"JSON generation or SSE protocol parts. Version 2 has flat usage; versions 3 and 4 have nested usage.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SdkResult"}},"text/event-stream":{"schema":{"type":"string"},"x-event-schema":{"$ref":"#/components/schemas/SdkEvent"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid or missing credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credit or allowance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not permitted for this project or plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unavailable model or project-owned resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation cannot safely complete right now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-intentional-differences":["URL prefix does not choose specification version; missing or unrecognized version headers fall back to 4.","Unsupported native tools and providerOptions produce typed warnings; they are not advertised as implemented."]}},"/mcp":{"post":{"operationId":"post_mcp","summary":"Stateless MCP JSON-RPC tools","security":[{"ApiKeyBearer":[]},{"ApiKeyHeader":[]},{"McpOAuth":["mcp:tools"]}],"parameters":[{"name":"MCP-Protocol-Version","in":"header","required":false,"schema":{"enum":["2024-11-05","2025-03-26","2025-06-18","2025-11-25"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RpcMessage"},{"type":"array","minItems":1,"maxItems":20,"items":{"$ref":"#/components/schemas/RpcMessage"}}]}}}},"responses":{"200":{"description":"JSON-RPC result(s), or SSE event: message with JSON-RPC data when explicitly requested.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RpcResponse"},{"type":"array","items":{"$ref":"#/components/schemas/RpcResponse"}}]}},"text/event-stream":{"schema":{"type":"string"},"x-event-schema":{"anyOf":[{"$ref":"#/components/schemas/RpcResponse"},{"type":"array","items":{"$ref":"#/components/schemas/RpcResponse"}}]}}}},"202":{"description":"Notifications accepted without a JSON-RPC response body."},"400":{"description":"Invalid JSON-RPC request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RpcResponse"}}}},"401":{"description":"Authentication required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Origin or scope not permitted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RpcResponse"}}}},"406":{"description":"Accept must allow JSON or SSE.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RpcResponse"}}}},"415":{"description":"JSON content type required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RpcResponse"}}}}},"x-intentional-differences":["Stateless POST only; no legacy session transport or provider-analytics tools.","Batch size is 1–20. Tools act on the authenticated local project."]},"get":{"operationId":"get_mcp","summary":"Unsupported legacy MCP transport","responses":{"405":{"description":"Only stateless POST transport is supported.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RpcResponse"}}}}},"x-supported":false,"x-intentional-differences":["Reference legacy SSE/session transport is deliberately unavailable."]},"head":{"operationId":"head_mcp","summary":"Unsupported legacy MCP transport","responses":{"405":{"description":"Only stateless POST transport is supported.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RpcResponse"}}}}},"x-supported":false,"x-intentional-differences":["Reference legacy SSE/session transport is deliberately unavailable."]},"delete":{"operationId":"delete_mcp","summary":"Unsupported legacy MCP transport","responses":{"405":{"description":"Only stateless POST transport is supported.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RpcResponse"}}}}},"x-supported":false,"x-intentional-differences":["Reference legacy SSE/session transport is deliberately unavailable."]}},"/.well-known/oauth-authorization-server":{"get":{"operationId":"get_well_known_oauth_authorization_server","summary":"Discover MCP OAuth authorization metadata","security":[],"responses":{"200":{"description":"Successful result.","content":{"application/json":{"schema":{"type":"object","properties":{"issuer":{"type":"string"},"authorization_endpoint":{"type":"string"},"token_endpoint":{"type":"string"},"registration_endpoint":{"type":"string"},"response_types_supported":{"type":"array","items":{"const":"code"}},"grant_types_supported":{"type":"array","items":{"const":"authorization_code"}},"code_challenge_methods_supported":{"type":"array","items":{"const":"S256"}},"token_endpoint_auth_methods_supported":{"type":"array","items":{"const":"none"}},"scopes_supported":{"type":"array","items":{"const":"mcp:tools"}}},"required":["issuer","authorization_endpoint","token_endpoint","registration_endpoint"],"additionalProperties":false}}}}}}},"/.well-known/oauth-protected-resource":{"get":{"operationId":"get_well_known_oauth_protected_resource","summary":"Discover the protected MCP resource","security":[],"responses":{"200":{"description":"Successful result.","content":{"application/json":{"schema":{"type":"object","properties":{"resource":{"type":"string"},"authorization_servers":{"type":"array","items":{"type":"string"}},"scopes_supported":{"type":"array","items":{"const":"mcp:tools"}},"bearer_methods_supported":{"type":"array","items":{"const":"header"}},"resource_name":{"type":"string"}},"required":["resource","authorization_servers","scopes_supported","bearer_methods_supported"],"additionalProperties":false}}}}}}},"/.well-known/oauth-authorization-server/mcp":{"get":{"operationId":"get_well_known_oauth_authorization_server_mcp","summary":"Discover MCP OAuth authorization metadata","security":[],"responses":{"200":{"description":"Successful result.","content":{"application/json":{"schema":{"type":"object","properties":{"issuer":{"type":"string"},"authorization_endpoint":{"type":"string"},"token_endpoint":{"type":"string"},"registration_endpoint":{"type":"string"},"response_types_supported":{"type":"array","items":{"const":"code"}},"grant_types_supported":{"type":"array","items":{"const":"authorization_code"}},"code_challenge_methods_supported":{"type":"array","items":{"const":"S256"}},"token_endpoint_auth_methods_supported":{"type":"array","items":{"const":"none"}},"scopes_supported":{"type":"array","items":{"const":"mcp:tools"}}},"required":["issuer","authorization_endpoint","token_endpoint","registration_endpoint"],"additionalProperties":false}}}}}}},"/.well-known/oauth-protected-resource/mcp":{"get":{"operationId":"get_well_known_oauth_protected_resource_mcp","summary":"Discover the protected MCP resource","security":[],"responses":{"200":{"description":"Successful result.","content":{"application/json":{"schema":{"type":"object","properties":{"resource":{"type":"string"},"authorization_servers":{"type":"array","items":{"type":"string"}},"scopes_supported":{"type":"array","items":{"const":"mcp:tools"}},"bearer_methods_supported":{"type":"array","items":{"const":"header"}},"resource_name":{"type":"string"}},"required":["resource","authorization_servers","scopes_supported","bearer_methods_supported"],"additionalProperties":false}}}}}}},"/oauth/register":{"post":{"operationId":"post_oauth_register","summary":"Register one exact MCP redirect URI","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthRegistration"}}}},"responses":{"201":{"description":"Successful result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthRegisteredClient"}}}},"400":{"description":"Invalid authorization request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthError"}}}},"403":{"description":"Consent or origin rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthError"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthError"}}}},"503":{"description":"Authorization temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthError"}}}}},"description":"HTTPS redirects, or HTTP loopback, without credentials or fragments. Public clients only; authorization_code/S256; no client_credentials or refresh grant."}},"/oauth/authorize":{"get":{"operationId":"get_oauth_authorize","summary":"Sign in and review project-scoped MCP consent","servers":[{"url":"https://cloakray.com"}],"security":[{"CookieSession":[]},{}],"parameters":[{"name":"client_id","in":"query","required":true,"schema":{"type":"string"}},{"name":"redirect_uri","in":"query","required":true,"schema":{"type":"string","format":"uri"}},{"name":"response_type","in":"query","required":true,"schema":{"const":"code"}},{"name":"code_challenge_method","in":"query","required":true,"schema":{"const":"S256"}},{"name":"code_challenge","in":"query","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"}},{"name":"state","in":"query","required":false,"schema":{"type":"string","maxLength":1024}},{"name":"scope","in":"query","required":false,"schema":{"const":"mcp:tools"}},{"name":"resource","in":"query","required":false,"schema":{"type":"string","const":"https://api.cloakray.com/mcp"}}],"responses":{"200":{"description":"Consent page.","content":{"text/html":{"schema":{"type":"string"}}}},"302":{"description":"Sign in first.","headers":{"Location":{"schema":{"type":"string"}}}},"400":{"description":"Invalid authorization request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthError"}}}},"403":{"description":"Consent or origin rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthError"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthError"}}}},"503":{"description":"Authorization temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthError"}}}}}},"post":{"operationId":"post_oauth_authorize","summary":"Submit same-origin MCP consent","servers":[{"url":"https://cloakray.com"}],"security":[{"CookieSession":[]}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"client_id":{"type":"string"},"redirect_uri":{"type":"string","format":"uri"},"response_type":{"const":"code"},"code_challenge_method":{"const":"S256"},"code_challenge":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"},"state":{"type":"string","maxLength":1024},"scope":{"const":"mcp:tools"},"resource":{"type":"string","const":"https://api.cloakray.com/mcp"},"csrf":{"type":"string"},"project_id":{"type":"string"},"organization_id":{"type":"string"},"decision":{"enum":["approve","deny"]}},"required":["client_id","redirect_uri","response_type","code_challenge_method","code_challenge","csrf","project_id","organization_id","decision"],"additionalProperties":false}}}},"responses":{"303":{"description":"Return a single-use authorization code or access_denied to the exact redirect URI.","headers":{"Location":{"schema":{"type":"string"}}}},"400":{"description":"Invalid authorization request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthError"}}}},"403":{"description":"Consent or origin rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthError"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthError"}}}},"503":{"description":"Authorization temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthError"}}}}},"x-csrf-required":true}},"/oauth/token":{"post":{"operationId":"post_oauth_token","summary":"Exchange a single-use S256 authorization code","security":[],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/OAuthTokenRequest"}}}},"responses":{"200":{"description":"Successful result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthToken"}}}},"400":{"description":"Invalid authorization request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthError"}}}},"403":{"description":"Consent or origin rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthError"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthError"}}}},"503":{"description":"Authorization temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthError"}}}}},"x-intentional-differences":["Only authorization_code is supported. Local tokens expire after one hour; no refresh token."]}}},"components":{"schemas":{"OpenAIError":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string"},"param":{"type":["string","null"]},"code":{"type":["string","null"]}},"required":["message","type","param","code"]}},"required":["error"]},"AnthropicError":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error":{"type":"object","properties":{"type":{"type":"string"},"message":{"type":"string"}},"required":["type","message"]}},"required":["type","error"]},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string"},"code":{"type":["string","null"]},"param":{"type":["string","null"]}},"required":["message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"OAuthError":{"type":"object","properties":{"error":{"type":"string"},"error_description":{"type":"string"}},"required":["error","error_description"],"additionalProperties":false},"ResponseInputPart":{"type":"object","properties":{"type":{"type":"string"},"text":{"type":"string"},"image_url":{"type":"string"},"file_id":{"type":"string"},"file_url":{"type":"string"},"file_data":{"type":"string"},"filename":{"type":"string"},"detail":{"enum":["auto","low","high"]},"input_audio":{"type":"object","properties":{"data":{"type":"string"},"format":{"type":"string"}},"required":["data","format"],"additionalProperties":false}},"required":["type"],"additionalProperties":false},"ResponseInputItem":{"anyOf":[{"type":"object","properties":{"type":{"const":"message"},"role":{"enum":["system","developer","user","assistant"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"$ref":"#/components/schemas/ResponseInputPart"}}]}},"required":["role","content"],"additionalProperties":false},{"type":"object","properties":{"type":{"const":"function_call"},"call_id":{"type":"string"},"name":{"type":"string"},"arguments":{"type":"string"}},"required":["type","call_id","name","arguments"],"additionalProperties":false},{"type":"object","properties":{"type":{"const":"function_call_output"},"call_id":{"type":"string"},"output":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"text":{"type":"string"},"image_url":{"type":"string"},"file_id":{"type":"string"},"file_url":{"type":"string"},"file_data":{"type":"string"},"filename":{"type":"string"},"detail":{"enum":["auto","low","high"]},"input_audio":{"type":"object","properties":{"data":{"type":"string"},"format":{"type":"string"}},"required":["data","format"],"additionalProperties":false}},"required":["type"],"additionalProperties":false}}]}},"required":["type","call_id","output"],"additionalProperties":false},{"type":"object","properties":{"type":{"const":"item_reference"},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"const":"reasoning"},"id":{"type":"string"},"summary":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false}},"encrypted_content":{"type":"string"}},"required":["type"],"additionalProperties":false}]},"Usage":{"type":"object","properties":{"input_tokens":{"type":"integer"},"output_tokens":{"type":"integer"},"total_tokens":{"type":"integer"},"cached_tokens":{"type":"integer"},"reasoning_tokens":{"type":"integer"},"input_tokens_details":{"type":"object","properties":{"cached_tokens":{"type":"integer"},"audio_tokens":{"type":"integer"},"text_tokens":{"type":"integer"}},"additionalProperties":false},"output_tokens_details":{"type":"object","properties":{"reasoning_tokens":{"type":"integer"},"audio_tokens":{"type":"integer"},"text_tokens":{"type":"integer"}},"additionalProperties":false}},"additionalProperties":false},"ResponsesRequest":{"type":"object","properties":{"model":{"type":"string","minLength":1,"maxLength":256},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{"$ref":"#/components/schemas/ResponseInputItem"}}]},"instructions":{"type":"string"},"previous_response_id":{"type":"string"},"stream":{"type":"boolean","default":false},"store":{"type":"boolean","default":true,"description":"Stored responses retain project scope; use false for non-stored requests."},"prompt_cache_key":{"type":"string"},"prompt_cache_retention":{"enum":["in_memory","24h",null]},"max_output_tokens":{"type":"number"},"temperature":{"type":"number"},"top_p":{"type":"number"},"tools":{"type":"array","items":{"type":"object","properties":{"type":{"const":"function"},"name":{"type":"string"},"description":{"type":"string"},"parameters":{"type":"object","additionalProperties":true},"strict":{"type":"boolean"}},"required":["type","name"],"additionalProperties":false}},"tool_choice":{"anyOf":[{"enum":["auto","none","required"]},{"type":"object","properties":{"type":{"const":"function"},"name":{"type":"string"}},"required":["type","name"],"additionalProperties":false}]},"parallel_tool_calls":{"type":"boolean"},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"text":{"type":"object","properties":{"format":{"type":"object","properties":{"type":{"enum":["text","json_object","json_schema"]},"name":{"type":"string"},"schema":{"type":"object","additionalProperties":true},"strict":{"type":"boolean"}},"required":["type"],"additionalProperties":false}},"additionalProperties":false}},"required":["model","input"],"additionalProperties":false},"ResponsesCompactRequest":{"type":"object","properties":{"model":{"type":"string","minLength":1,"maxLength":256},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{"$ref":"#/components/schemas/ResponseInputItem"}}]},"previous_response_id":{"type":"string"},"instructions":{"type":"string"},"prompt_cache_key":{"type":"string"}},"required":["model"],"additionalProperties":false},"Response":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"response"},"model":{"type":"string","minLength":1,"maxLength":256},"created_at":{"type":"number"},"status":{"type":"string"},"output":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"},"role":{"type":"string"},"status":{"type":"string"},"content":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"text":{"type":"string"},"image_url":{"type":"string"},"file_id":{"type":"string"},"file_url":{"type":"string"},"file_data":{"type":"string"},"filename":{"type":"string"},"detail":{"enum":["auto","low","high"]},"input_audio":{"type":"object","properties":{"data":{"type":"string"},"format":{"type":"string"}},"required":["data","format"],"additionalProperties":false}},"required":["type"],"additionalProperties":false}},"call_id":{"type":"string"},"name":{"type":"string"},"arguments":{"type":"string"},"output":{"type":"string"}},"required":["type"],"additionalProperties":false}},"output_text":{"type":"string"},"usage":{"$ref":"#/components/schemas/Usage"},"error":{"anyOf":[{"$ref":"#/components/schemas/Error"},{"type":"null"}]},"incomplete_details":{"type":"object","properties":{"reason":{"type":"string"}},"additionalProperties":false},"metadata":{"type":"object","additionalProperties":{"type":"string"}}},"required":["id","object","model","output"],"additionalProperties":false},"ResponseEvent":{"type":"object","properties":{"type":{"type":"string"},"sequence_number":{"type":"integer"},"response":{"$ref":"#/components/schemas/Response"},"delta":{"type":"string"},"item":{"$ref":"#/components/schemas/ResponseInputItem"},"item_id":{"type":"string"},"output_index":{"type":"integer"},"content_index":{"type":"integer"},"text":{"type":"string"},"arguments":{"type":"string"}},"required":["type"],"additionalProperties":false},"CompactedResponse":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"created_at":{"type":"number"},"output":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"},"encrypted_content":{"type":"string"}},"required":["type"],"additionalProperties":false}},"usage":{"$ref":"#/components/schemas/Usage"}},"required":["id","object","output"],"additionalProperties":false},"Model":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":256},"object":{"const":"model"},"created":{"type":"integer"},"owned_by":{"type":"string","description":"Public model creator, not who served a request."},"name":{"type":"string"},"description":{"type":"string"},"context_length":{"type":["number","null"]},"max_output_tokens":{"type":["number","null"]},"input_modalities":{"type":"array","items":{"type":"string"}},"output_modalities":{"type":"array","items":{"type":"string"}},"capabilities":{"type":"object","properties":{"vision":{"type":"boolean"},"tools":{"type":"boolean"},"reasoning":{"type":"boolean"},"streaming":{"type":"boolean"},"json_mode":{"type":"boolean"}},"additionalProperties":false},"endpoints":{"type":"array","items":{"type":"string"},"description":"Endpoints currently allowed by verified capability and billing bounds; project entitlements still apply."},"declared_endpoints":{"type":"array","items":{"type":"string"},"description":"Declared interface support, not a promise of current availability."},"availability":{"type":"string","enum":["available","unavailable","unverified"],"description":"Overall model availability; inspect api_availability for a particular interface."},"api_availability":{"type":"array","items":{"type":"object","properties":{"endpoint":{"type":"string"},"status":{"type":"string","enum":["available","unavailable","unverified"]}},"required":["endpoint","status"],"additionalProperties":false}},"aliases":{"type":"array","items":{"type":"string"}},"pricing":{"type":"object","properties":{"input":{"type":["number","null"]},"output":{"type":["number","null"]},"cached_input":{"type":["number","null"]},"meters":{"type":"array","items":{"type":"object","properties":{"unit":{"type":"string"},"usd":{"type":"number"},"qualifier":{"type":"string"}},"required":["unit","usd"],"additionalProperties":false}}},"additionalProperties":false}},"required":["id","object","created","owned_by","name","endpoints"],"additionalProperties":false},"Models":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Model"}}},"required":["object","data"],"additionalProperties":false},"Credits":{"type":"object","properties":{"balance":{"type":"string","pattern":"^-?[0-9]+(?:\\.[0-9]+)?$"},"total_used":{"type":"string","pattern":"^-?[0-9]+(?:\\.[0-9]+)?$"}},"required":["balance","total_used"],"additionalProperties":false},"Key":{"type":"object","properties":{"data":{"type":"object","properties":{"label":{"type":"string"},"usage":{"type":"string","pattern":"^-?[0-9]+(?:\\.[0-9]+)?$"},"limit":{"type":"null"},"devPlan":{"type":"string"},"devPlanCreditsUsed":{"type":"string","pattern":"^-?[0-9]+(?:\\.[0-9]+)?$"},"devPlanCreditsLimit":{"type":"string","pattern":"^-?[0-9]+(?:\\.[0-9]+)?$"},"devPlanCreditsRemaining":{"type":"string","pattern":"^-?[0-9]+(?:\\.[0-9]+)?$"},"devPlanPremiumWeeklyLimit":{"type":"string","pattern":"^-?[0-9]+(?:\\.[0-9]+)?$"},"devPlanPremiumCreditsUsed":{"type":"string","pattern":"^-?[0-9]+(?:\\.[0-9]+)?$"},"devPlanPremiumWeekResetsAt":{"type":"null"},"devPlanDailyLimit":{"type":"string","pattern":"^-?[0-9]+(?:\\.[0-9]+)?$"},"devPlanDailyCreditsUsed":{"type":"string","pattern":"^-?[0-9]+(?:\\.[0-9]+)?$"},"devPlanDayResetsAt":{"type":"null"}},"required":["label","usage","limit","devPlan"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"SdkPart":{"type":"object","properties":{"type":{"type":"string"},"text":{"type":"string"},"filename":{"type":"string"},"mediaType":{"type":"string"},"data":{"anyOf":[{"type":"string"},{"type":"object","properties":{"type":{"type":"string"},"data":{"type":"string"},"url":{"type":"string"},"text":{"type":"string"}},"additionalProperties":false}]},"toolCallId":{"type":"string"},"toolName":{"type":"string"},"input":{},"output":{},"approvalId":{"type":"string"},"approved":{"type":"boolean"},"reason":{"type":"string"}},"required":["type"],"additionalProperties":false},"SdkRequest":{"type":"object","properties":{"prompt":{"type":"array","items":{"type":"object","properties":{"role":{"enum":["system","user","assistant","tool"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"$ref":"#/components/schemas/SdkPart"}}]}},"required":["role","content"],"additionalProperties":false}},"maxOutputTokens":{"type":"number"},"temperature":{"type":"number"},"stopSequences":{"type":"array","items":{"type":"string"}},"topP":{"type":"number"},"topK":{"type":"number"},"presencePenalty":{"type":"number"},"frequencyPenalty":{"type":"number"},"seed":{"type":"number"},"tools":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"name":{"type":"string"},"id":{"type":"string"},"description":{"type":"string"},"inputSchema":{"type":"object","additionalProperties":true}},"required":["type"],"additionalProperties":false}},"toolChoice":{"type":"object","properties":{"type":{"enum":["auto","none","required","tool"]},"toolName":{"type":"string"}},"required":["type"],"additionalProperties":false},"responseFormat":{"type":"object","properties":{"type":{"enum":["text","json"]},"schema":{"type":"object","additionalProperties":true},"name":{"type":"string"},"description":{"type":"string"}},"required":["type"],"additionalProperties":false},"includeRawChunks":{"type":"boolean"}},"required":["prompt"],"additionalProperties":false},"SdkUsage2":{"type":"object","properties":{"inputTokens":{"type":"number"},"outputTokens":{"type":"number"},"totalTokens":{"type":"number"},"reasoningTokens":{"type":"number"},"cachedInputTokens":{"type":"number"}},"additionalProperties":false},"SdkUsage34":{"type":"object","properties":{"inputTokens":{"type":"object","properties":{"total":{"type":"number"},"noCache":{"type":"number"},"cacheRead":{"type":"number"},"cacheWrite":{"type":"number"}},"additionalProperties":false},"outputTokens":{"type":"object","properties":{"total":{"type":"number"},"text":{"type":"number"},"reasoning":{"type":"number"}},"additionalProperties":false}},"required":["inputTokens","outputTokens"],"additionalProperties":false},"SdkWarning":{"anyOf":[{"type":"object","properties":{"type":{"const":"unsupported-setting"},"setting":{"type":"string"}},"required":["type","setting"],"additionalProperties":false},{"type":"object","properties":{"type":{"const":"unsupported"},"feature":{"type":"string"}},"required":["type","feature"],"additionalProperties":false},{"type":"object","properties":{"type":{"const":"unsupported-tool"},"tool":{"type":"object","properties":{"type":{"type":"string"},"name":{"type":"string"},"id":{"type":"string"}},"required":["type"],"additionalProperties":false}},"required":["type","tool"],"additionalProperties":false},{"type":"object","properties":{"type":{"const":"other"},"message":{"type":"string"}},"required":["type","message"],"additionalProperties":false}]},"SdkResult":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/SdkPart"}},"finishReason":{"enum":["stop","length","tool-calls","content-filter","error","unknown"]},"usage":{"anyOf":[{"$ref":"#/components/schemas/SdkUsage2"},{"$ref":"#/components/schemas/SdkUsage34"}]},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/SdkWarning"}}},"required":["content","finishReason","usage","warnings"],"additionalProperties":false},"SdkEvent":{"type":"object","properties":{"type":{"enum":["stream-start","text-start","text-delta","text-end","reasoning-start","reasoning-delta","reasoning-end","tool-input-start","tool-input-delta","tool-input-end","tool-call","finish","error"]},"id":{"type":"string"},"delta":{"type":"string"},"toolCallId":{"type":"string"},"toolName":{"type":"string"},"input":{"type":"string"},"finishReason":{"type":"string"},"usage":{"anyOf":[{"$ref":"#/components/schemas/SdkUsage2"},{"$ref":"#/components/schemas/SdkUsage34"}]},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/SdkWarning"}},"error":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}},"required":["type"],"additionalProperties":false},"SdkConfig":{"type":"object","properties":{"models":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":256},"name":{"type":"string"},"description":{"type":"string"},"pricing":{"type":"object","properties":{"input":{"type":"string"},"output":{"type":"string"},"input_cache_read":{"type":"string"}},"required":["input","output"],"additionalProperties":false},"specification":{"type":"object","properties":{"specificationVersion":{"const":"v4"},"provider":{"type":"string","description":"Public integration brand identifier; never a serving-provider identifier."},"modelId":{"type":"string","minLength":1,"maxLength":256}},"required":["specificationVersion","provider","modelId"],"additionalProperties":false},"modelType":{"const":"language"}},"required":["id","name","description","specification","modelType"],"additionalProperties":false}}},"required":["models"],"additionalProperties":false},"RpcMessage":{"type":"object","properties":{"jsonrpc":{"const":"2.0"},"id":{"type":["string","number","null"]},"method":{"type":"string","enum":["initialize","ping","tools/list","tools/call","resources/list","prompts/list","notifications/initialized"]},"params":{"type":"object","properties":{"protocolVersion":{"type":"string"},"clientInfo":{"type":"object","properties":{"name":{"type":"string"},"version":{"type":"string"}},"additionalProperties":false},"capabilities":{"type":"object"},"name":{"enum":["chat","list-models","generate-image","list-image-models","generate-nano-banana","get-account"]},"arguments":{"type":"object","description":"Tool arguments follow the inputSchema returned by tools/list."}},"additionalProperties":false}},"required":["jsonrpc","method"],"additionalProperties":false},"RpcResponse":{"type":"object","properties":{"jsonrpc":{"const":"2.0"},"id":{"type":["string","number","null"]},"result":{"anyOf":[{"type":"object","properties":{"protocolVersion":{"type":"string"},"capabilities":{"type":"object","properties":{"tools":{"type":"object","properties":{"listChanged":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},"serverInfo":{"type":"object","properties":{"name":{"type":"string"},"version":{"type":"string"}},"additionalProperties":false},"instructions":{"type":"string"}},"additionalProperties":false},{"type":"object","properties":{"tools":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"inputSchema":{"type":"object"},"annotations":{"type":"object","properties":{"readOnlyHint":{"type":"boolean"}},"additionalProperties":false}},"required":["name","inputSchema"],"additionalProperties":false}}},"additionalProperties":false},{"type":"object","properties":{"content":{"type":"array","items":{"type":"object","properties":{"type":{"enum":["text","image"]},"text":{"type":"string"},"data":{"type":"string"},"mimeType":{"type":"string"}},"required":["type"],"additionalProperties":false}},"isError":{"type":"boolean"}},"additionalProperties":false},{"type":"object","properties":{"resources":{"type":"array","items":{"type":"object","properties":{"uri":{"type":"string"},"name":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false},{"type":"object","properties":{"prompts":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}]},"error":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["jsonrpc","id"],"additionalProperties":false},"OAuthRegistration":{"type":"object","properties":{"redirect_uris":{"type":"array","minItems":1,"maxItems":1,"items":{"type":"string","format":"uri","maxLength":2048}},"token_endpoint_auth_method":{"const":"none"},"grant_types":{"type":"array","items":{"const":"authorization_code"}},"response_types":{"type":"array","minItems":1,"maxItems":1,"items":{"const":"code"}}},"required":["redirect_uris"],"additionalProperties":false},"OAuthRegisteredClient":{"type":"object","properties":{"client_id":{"type":"string"},"redirect_uris":{"type":"array","items":{"type":"string"}},"token_endpoint_auth_method":{"const":"none"},"grant_types":{"type":"array","items":{"const":"authorization_code"}},"response_types":{"type":"array","items":{"const":"code"}},"scope":{"const":"mcp:tools"}},"required":["client_id","redirect_uris","token_endpoint_auth_method","grant_types","response_types","scope"],"additionalProperties":false},"OAuthTokenRequest":{"type":"object","properties":{"grant_type":{"const":"authorization_code"},"code":{"type":"string","maxLength":256},"code_verifier":{"type":"string","pattern":"^[A-Za-z0-9._~-]{43,128}$"},"client_id":{"type":"string"},"redirect_uri":{"type":"string","format":"uri"},"resource":{"type":"string","format":"uri"}},"required":["grant_type","code","code_verifier","client_id","redirect_uri"],"additionalProperties":false},"OAuthToken":{"type":"object","properties":{"access_token":{"type":"string","format":"password","readOnly":true},"token_type":{"const":"Bearer"},"expires_in":{"const":3600},"scope":{"const":"mcp:tools"}},"required":["access_token","token_type","expires_in","scope"],"additionalProperties":false}},"securitySchemes":{"ApiKeyBearer":{"type":"http","scheme":"bearer","description":"Project API key; keep long-lived keys on the server."},"ApiKeyHeader":{"type":"apiKey","in":"header","name":"x-api-key"},"CookieSession":{"type":"apiKey","in":"cookie","name":"ploy_session","description":"Website login session for consent only; never an inference API key."},"McpOAuth":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"https://cloakray.com/oauth/authorize","tokenUrl":"https://api.cloakray.com/oauth/token","scopes":{"mcp:tools":"Use tools in the consented project."}}}}}},"x-intentional-differences":["Canonical public IDs and project ownership; no provider-pinned mappings, serving metadata, internal usage receipts, quotes or account-cost APIs.","Account endpoints describe only the caller's local organization/project.","SDK wire versions and stateless MCP/OAuth are independent protocols, not inferred from OpenAI SDK compatibility.","Responses and media remain project-scoped. Missing verified billing or transport refuses the operation.","Legacy /systemone, completions and model-detail routes are not offered."]}