{"components":{"headers":{"RateLimitLimitRequests":{"description":"Requests per minute your account may send to model endpoints. The limit is per account: all of its API keys share it. Also sent on successful responses.","schema":{"example":60,"type":"integer"}},"RateLimitRemainingRequests":{"description":"Requests left in the current window. Also sent on successful responses.","schema":{"example":59,"type":"integer"}},"RateLimitResetRequests":{"description":"Time until the limit is fully restored, as a duration in whole seconds (`1s`, `42s`) or, under one second, in milliseconds (`250ms`). Also sent on successful responses.","schema":{"example":"1s","type":"string"}},"RetryAfter":{"description":"Seconds to wait before retrying.","schema":{"example":1,"type":"integer"}}},"parameters":{"GeminiModelCreator":{"description":"The part of the model ID before the slash (`google` in `google/gemini-3.1-flash-lite`). To pin a provider, prefix it with `provider:`, as in `google:google`.","in":"path","name":"creator","required":true,"schema":{"type":"string"}},"GeminiModelName":{"description":"The part of the model ID after the slash (`gemini-3.1-flash-lite`).","in":"path","name":"model","required":true,"schema":{"type":"string"}},"VideoID":{"description":"The `id` of a video job.","in":"path","name":"id","required":true,"schema":{"type":"string"}}},"responses":{"AccountUsageForbidden":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}},"description":"Code `permission_denied`: the API key is not an admin key. Account usage and the lists of stored responses and videos are readable with admin keys, the console session, and OAuth tokens with full access. Code `account_suspended`: your account is suspended."},"BadGateway":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}},"description":"The model provider returned an error or could not be reached"},"BadRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}},"description":"Invalid request parameters"},"Conflict":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}},"description":"Resource state conflict"},"Forbidden":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}},"description":"Code `account_suspended`: your account is suspended."},"GeminiBadRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeminiError"}}},"description":"Invalid request parameters"},"GeminiForbidden":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeminiError"}}},"description":"Reason `MODEL_NOT_ALLOWED`: the API key's allowed models don't include this model. Reason `ACCOUNT_SUSPENDED`: your account is suspended."},"GeminiPaymentRequired":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeminiError"}}},"description":"Reason `INSUFFICIENT_CREDITS`: your credit balance is used up. Reason `API_KEY_SPEND_LIMIT_EXCEEDED`: the API key reached its spend limit."},"GeminiRateLimited":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeminiError"}}},"description":"Your account reached its requests-per-minute limit for model endpoints. Wait for Retry-After before retrying.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"GeminiUnauthorized":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeminiError"}}},"description":"Unauthorized (invalid or missing API key)"},"ModelForbidden":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}},"description":"Code `model_not_allowed`: the API key's allowed models don't include the requested model. Code `account_suspended`: your account is suspended."},"ModelRateLimited":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}},"description":"Your account reached its requests-per-minute limit for model endpoints (code `rate_limit_exceeded`). The limit is per account, shared by all of its API keys. With BYOK, the provider may also rate-limit your own key. Wait for Retry-After before retrying.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"X-RateLimit-Limit-Requests":{"$ref":"#/components/headers/RateLimitLimitRequests"},"X-RateLimit-Remaining-Requests":{"$ref":"#/components/headers/RateLimitRemainingRequests"},"X-RateLimit-Reset-Requests":{"$ref":"#/components/headers/RateLimitResetRequests"}}},"NotAcceptable":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}},"description":"Requested response format is not supported"},"NotFound":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}},"description":"Resource not found"},"PayloadTooLarge":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}},"description":"Request or stored response body exceeds the configured size limit"},"PaymentRequired":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}},"description":"Code `insufficient_credits`: your account's credit balance is used up, or, on a model request, the account has not made its first top-up yet. Code `api_key_spend_limit_exceeded`: the API key reached the spend limit set on it."},"RateLimited":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}},"description":"Too many requests (code `rate_limit_exceeded`). Wait for Retry-After before retrying.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"ServiceUnavailable":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}},"description":"Service temporarily unavailable — code `model_overloaded` means the model's upstream capacity is exhausted (not your rate limit); honor Retry-After"},"Unauthorized":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}},"description":"Unauthorized (invalid or missing API key)"},"VideoNotFound":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}},"description":"No video job with this ID in your account (error type `job_not_found`)"},"VideoNotReady":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}},"description":"The video is not finished, or its download has not expired yet (error type `job_not_ready`)"}},"schemas":{"Annotation":{"description":"An annotation that applies to a span of output text.","discriminator":{"mapping":{"container_file_citation":"#/components/schemas/ContainerFileCitationBody","file_citation":"#/components/schemas/FileCitationBody","file_path":"#/components/schemas/FilePath","url_citation":"#/components/schemas/UrlCitationBody"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/FileCitationBody"},{"$ref":"#/components/schemas/UrlCitationBody"},{"$ref":"#/components/schemas/ContainerFileCitationBody"},{"$ref":"#/components/schemas/FilePath"}]},"AnthCreateMessageParams":{"additionalProperties":false,"example":{"max_tokens":1024,"messages":[{"content":"Hello, world","role":"user"}],"model":"claude-opus-4-6"},"properties":{"cache_control":{"anyOf":[{"discriminator":{"mapping":{"ephemeral":"#/components/schemas/CacheControlEphemeral"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/CacheControlEphemeral"}]},{"type":"null"}],"description":"Top-level cache control automatically applies a cache_control marker to the last cacheable block in the request.","title":"Cache Control"},"container":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Container identifier for reuse across requests.","title":"Container"},"inference_geo":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Specifies the geographic region for inference processing. If not specified, the workspace's `default_inference_geo` is used.","title":"Inference Geo"},"max_tokens":{"description":"The maximum number of tokens to generate before stopping.\n\nNote that our models may stop _before_ reaching this maximum. This parameter only specifies the absolute maximum number of tokens to generate.\n\nDifferent models have different maximum values for this parameter.  See [models](https://docs.claude.com/en/docs/models-overview) for details.","examples":[1024],"minimum":1,"title":"Max Tokens","type":"integer"},"messages":{"description":"Input messages.\n\nOur models are trained to operate on alternating `user` and `assistant` conversational turns. When creating a new `Message`, you specify the prior conversational turns with the `messages` parameter, and the model then generates the next `Message` in the conversation. Consecutive `user` or `assistant` turns in your request will be combined into a single turn.\n\nEach input message must be an object with a `role` and `content`. You can specify a single `user`-role message, or you can include multiple `user` and `assistant` messages.\n\nIf the final message uses the `assistant` role, the response content will continue immediately from the content in that message. This can be used to constrain part of the model's response.\n\nExample with a single `user` message:\n\n```json\n[{\"role\": \"user\", \"content\": \"Hello, Claude\"}]\n```\n\nExample with multiple conversational turns:\n\n```json\n[\n  {\"role\": \"user\", \"content\": \"Hello there.\"},\n  {\"role\": \"assistant\", \"content\": \"Hi, I'm Claude. How can I help you?\"},\n  {\"role\": \"user\", \"content\": \"Can you explain LLMs in plain English?\"},\n]\n```\n\nExample with a partially-filled response from Claude:\n\n```json\n[\n  {\"role\": \"user\", \"content\": \"What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun\"},\n  {\"role\": \"assistant\", \"content\": \"The best answer is (\"},\n]\n```\n\nEach input message `content` may be either a single `string` or an array of content blocks, where each block has a specific `type`. Using a `string` for `content` is shorthand for an array of one content block of type `\"text\"`. The following input messages are equivalent:\n\n```json\n{\"role\": \"user\", \"content\": \"Hello, Claude\"}\n```\n\n```json\n{\"role\": \"user\", \"content\": [{\"type\": \"text\", \"text\": \"Hello, Claude\"}]}\n```\n\nSee [input examples](https://docs.claude.com/en/api/messages-examples).\n\nNote that if you want to include a [system prompt](https://docs.claude.com/en/docs/system-prompts), you can use the top-level `system` parameter — there is no `\"system\"` role for input messages in the Messages API.\n\nThere is a limit of 100,000 messages in a single request.","items":{"$ref":"#/components/schemas/AnthInputMessage"},"title":"Messages","type":"array"},"metadata":{"$ref":"#/components/schemas/AnthMetadata","description":"An object describing metadata about the request."},"model":{"$ref":"#/components/schemas/Model"},"output_config":{"$ref":"#/components/schemas/OutputConfig","description":"Configuration options for the model's output, such as the output format."},"service_tier":{"description":"Determines whether to use priority capacity (if available) or standard capacity for this request.\n\nAnthropic offers different levels of service for your API requests. See [service-tiers](https://docs.claude.com/en/api/service-tiers) for details.","enum":["auto","standard_only"],"title":"Service Tier","type":"string"},"stop_sequences":{"description":"Custom text sequences that will cause the model to stop generating.\n\nOur models will normally stop when they have naturally completed their turn, which will result in a response `stop_reason` of `\"end_turn\"`.\n\nIf you want the model to stop generating when it encounters custom strings of text, you can use the `stop_sequences` parameter. If the model encounters one of the custom sequences, the response `stop_reason` value will be `\"stop_sequence\"` and the response `stop_sequence` value will contain the matched stop sequence.","items":{"type":"string"},"title":"Stop Sequences","type":"array"},"stream":{"description":"Whether to incrementally stream the response using server-sent events.\n\nSee [streaming](https://docs.claude.com/en/api/messages-streaming) for details.","title":"Stream","type":"boolean"},"system":{"anyOf":[{"type":"string"},{"items":{"$ref":"#/components/schemas/RequestTextBlock"},"type":"array"}],"description":"System prompt.\n\nA system prompt is a way of providing context and instructions to Claude, such as specifying a particular goal or role. See our [guide to system prompts](https://docs.claude.com/en/docs/system-prompts).","examples":[[{"text":"Today's date is 2024-06-01.","type":"text"}],"Today's date is 2023-01-01."],"title":"System"},"temperature":{"description":"Amount of randomness injected into the response.\n\nDefaults to `1.0`. Ranges from `0.0` to `1.0`. Use `temperature` closer to `0.0` for analytical / multiple choice, and closer to `1.0` for creative and generative tasks.\n\nNote that even with `temperature` of `0.0`, the results will not be fully deterministic.","examples":[1],"maximum":1,"minimum":0,"title":"Temperature","type":"number"},"thinking":{"$ref":"#/components/schemas/ThinkingConfigParam"},"tool_choice":{"$ref":"#/components/schemas/ToolChoice"},"tools":{"description":"Definitions of tools that the model may use.\n\nIf you include `tools` in your API request, the model may return `tool_use` content blocks that represent the model's use of those tools. You can then run those tools using the tool input generated by the model and then optionally return results back to the model using `tool_result` content blocks.\n\nThere are two types of tools: **client tools** and **server tools**. The behavior described below applies to client tools. For [server tools](https://docs.claude.com/en/docs/agents-and-tools/tool-use/overview\\#server-tools), see their individual documentation as each has its own behavior (e.g., the [web search tool](https://docs.claude.com/en/docs/agents-and-tools/tool-use/web-search-tool)).\n\nEach tool definition includes:\n\n* `name`: Name of the tool.\n* `description`: Optional, but strongly-recommended description of the tool.\n* `input_schema`: [JSON schema](https://json-schema.org/draft/2020-12) for the tool `input` shape that the model will produce in `tool_use` output content blocks.\n\nFor example, if you defined `tools` as:\n\n```json\n[\n  {\n    \"name\": \"get_stock_price\",\n    \"description\": \"Get the current stock price for a given ticker symbol.\",\n    \"input_schema\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"ticker\": {\n          \"type\": \"string\",\n          \"description\": \"The stock ticker symbol, e.g. AAPL for Apple Inc.\"\n        }\n      },\n      \"required\": [\"ticker\"]\n    }\n  }\n]\n```\n\nAnd then asked the model \"What's the S&P 500 at today?\", the model might produce `tool_use` content blocks in the response like this:\n\n```json\n[\n  {\n    \"type\": \"tool_use\",\n    \"id\": \"toolu_01D7FLrfh4GYq7yT1ULFeyMV\",\n    \"name\": \"get_stock_price\",\n    \"input\": { \"ticker\": \"^GSPC\" }\n  }\n]\n```\n\nYou might then run your `get_stock_price` tool with `{\"ticker\": \"^GSPC\"}` as an input, and return the following back to the model in a subsequent `user` message:\n\n```json\n[\n  {\n    \"type\": \"tool_result\",\n    \"tool_use_id\": \"toolu_01D7FLrfh4GYq7yT1ULFeyMV\",\n    \"content\": \"259.75 USD\"\n  }\n]\n```\n\nTools can be used for workflows that include running client-side tools and functions, or more generally whenever you want the model to produce a particular JSON structure of output.\n\nSee our [guide](https://docs.claude.com/en/docs/tool-use) for more details.","examples":[{"description":"Get the current weather in a given location","input_schema":{"properties":{"location":{"description":"The city and state, e.g. San Francisco, CA","type":"string"},"unit":{"description":"Unit for the output - one of (celsius, fahrenheit)","type":"string"}},"required":["location"],"type":"object"},"name":"get_weather"}],"items":{"oneOf":[{"$ref":"#/components/schemas/AnthTool"},{"$ref":"#/components/schemas/BashTool_20250124"},{"$ref":"#/components/schemas/CodeExecutionTool_20250522"},{"$ref":"#/components/schemas/CodeExecutionTool_20250825"},{"$ref":"#/components/schemas/CodeExecutionTool_20260120"},{"$ref":"#/components/schemas/MemoryTool_20250818"},{"$ref":"#/components/schemas/TextEditor_20250124"},{"$ref":"#/components/schemas/TextEditor_20250429"},{"$ref":"#/components/schemas/TextEditor_20250728"},{"$ref":"#/components/schemas/WebSearchTool_20250305"},{"$ref":"#/components/schemas/WebFetchTool_20250910"},{"$ref":"#/components/schemas/WebSearchTool_20260209"},{"$ref":"#/components/schemas/WebFetchTool_20260209"},{"$ref":"#/components/schemas/ToolSearchToolBM25_20251119"},{"$ref":"#/components/schemas/ToolSearchToolRegex_20251119"}]},"title":"Tools","type":"array"},"top_k":{"description":"Only sample from the top K options for each subsequent token.\n\nUsed to remove \"long tail\" low probability responses. [Learn more technical details here](https://towardsdatascience.com/how-to-sample-from-language-models-682bceb97277).\n\nRecommended for advanced use cases only. You usually only need to use `temperature`.","examples":[5],"minimum":0,"title":"Top K","type":"integer"},"top_p":{"description":"Use nucleus sampling.\n\nIn nucleus sampling, we compute the cumulative distribution over all the options for each subsequent token in decreasing probability order and cut it off once it reaches a particular probability specified by `top_p`. You should either alter `temperature` or `top_p`, but not both.\n\nRecommended for advanced use cases only. You usually only need to use `temperature`.","examples":[0.7],"maximum":1,"minimum":0,"title":"Top P","type":"number"}},"required":["model","messages","max_tokens"],"title":"CreateMessageParams","type":"object"},"AnthInputMessage":{"additionalProperties":false,"discriminator":{"propertyName":"role"},"properties":{"content":{"anyOf":[{"type":"string"},{"example":[{"text":"What is a quaternion?","type":"text"}],"items":{"$ref":"#/components/schemas/InputContentBlock"},"type":"array"}],"title":"Content"},"role":{"enum":["user","assistant"],"title":"Role","type":"string"}},"required":["content","role"],"title":"InputMessage","type":"object"},"AnthMetadata":{"additionalProperties":false,"properties":{"user_id":{"anyOf":[{"maxLength":256,"type":"string"},{"type":"null"}],"description":"An external identifier for the user who is associated with the request.\n\nThis should be a uuid, hash value, or other opaque identifier. Anthropic may use this id to help detect abuse. Do not include any identifying information such as name, email address, or phone number.","examples":["13803d75-b4b5-4c3e-b2a2-6f21399b021b"],"title":"User Id"}},"title":"Metadata","type":"object"},"AnthTool":{"additionalProperties":false,"properties":{"allowed_callers":{"items":{"enum":["direct","code_execution_20250825","code_execution_20260120"],"type":"string"},"title":"Allowed Callers","type":"array"},"cache_control":{"anyOf":[{"discriminator":{"mapping":{"ephemeral":"#/components/schemas/CacheControlEphemeral"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/CacheControlEphemeral"}]},{"type":"null"}],"description":"Create a cache control breakpoint at this content block.","title":"Cache Control"},"defer_loading":{"description":"If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.","title":"Defer Loading","type":"boolean"},"description":{"description":"Description of what this tool does.\n\nTool descriptions should be as detailed as possible. The more information that the model has about what the tool is and how to use it, the better it will perform. You can use natural language descriptions to reinforce important aspects of the tool input JSON schema.","examples":["Get the current weather in a given location"],"title":"Description","type":"string"},"eager_input_streaming":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Enable eager input streaming for this tool. When true, tool input parameters will be streamed incrementally as they are generated, and types will be inferred on-the-fly rather than buffering the full JSON output. When false, streaming is disabled for this tool even if the fine-grained-tool-streaming beta is active. When null (default), uses the default behavior based on beta headers.","title":"Eager Input Streaming"},"input_examples":{"items":{"additionalProperties":{"$ref":"#/components/schemas/JsonValue"},"type":"object"},"title":"Input Examples","type":"array"},"input_schema":{"$ref":"#/components/schemas/InputSchema","description":"[JSON schema](https://json-schema.org/draft/2020-12) for this tool's input.\n\nThis defines the shape of the `input` that your tool accepts and that the model will produce.","examples":[{"properties":{"location":{"description":"The city and state, e.g. San Francisco, CA","type":"string"},"unit":{"description":"Unit for the output - one of (celsius, fahrenheit)","type":"string"}},"required":["location"],"type":"object"}]},"name":{"description":"Name of the tool.\n\nThis is how the tool will be called by the model and in `tool_use` blocks.","maxLength":128,"minLength":1,"pattern":"^[a-zA-Z0-9_-]{1,128}$","title":"Name","type":"string"},"strict":{"description":"When true, guarantees schema validation on tool names and inputs","title":"Strict","type":"boolean"},"type":{"anyOf":[{"type":"null"},{"const":"custom","type":"string"}],"title":"Type"}},"required":["name","input_schema"],"title":"Tool","type":"object"},"ApplyPatchCallOutputStatus":{"enum":["completed","failed"],"type":"string"},"ApplyPatchCallOutputStatusParam":{"additionalProperties":true,"description":"Opaque upstream schema placeholder for ApplyPatchCallOutputStatusParam; see overlay x-ohmygpt-opaque-upstream-schemas for rationale.","properties":{"type":{"type":"string"}},"required":["type"],"type":"object","x-ohmygpt-opaque":true,"x-ohmygpt-upstream-ref":"ApplyPatchCallOutputStatusParam"},"ApplyPatchCallStatus":{"enum":["in_progress","completed"],"type":"string"},"ApplyPatchCallStatusParam":{"additionalProperties":true,"description":"Opaque upstream schema placeholder for ApplyPatchCallStatusParam; see overlay x-ohmygpt-opaque-upstream-schemas for rationale.","properties":{"type":{"type":"string"}},"required":["type"],"type":"object","x-ohmygpt-opaque":true,"x-ohmygpt-upstream-ref":"ApplyPatchCallStatusParam"},"ApplyPatchCreateFileOperation":{"description":"Instruction describing how to create a file via the apply_patch tool.","properties":{"diff":{"description":"Diff to apply.","type":"string"},"path":{"description":"Path of the file to create.","type":"string"},"type":{"default":"create_file","description":"Create a new file with the provided diff.","enum":["create_file"],"type":"string","x-stainless-const":true}},"required":["type","path","diff"],"title":"Apply patch create file operation","type":"object"},"ApplyPatchDeleteFileOperation":{"description":"Instruction describing how to delete a file via the apply_patch tool.","properties":{"path":{"description":"Path of the file to delete.","type":"string"},"type":{"default":"delete_file","description":"Delete the specified file.","enum":["delete_file"],"type":"string","x-stainless-const":true}},"required":["type","path"],"title":"Apply patch delete file operation","type":"object"},"ApplyPatchOperationParam":{"additionalProperties":true,"description":"Opaque upstream schema placeholder for ApplyPatchOperationParam; see overlay x-ohmygpt-opaque-upstream-schemas for rationale.","properties":{"type":{"type":"string"}},"required":["type"],"type":"object","x-ohmygpt-opaque":true,"x-ohmygpt-upstream-ref":"ApplyPatchOperationParam"},"ApplyPatchToolCall":{"description":"A tool call that applies file diffs by creating, deleting, or updating files.","properties":{"call_id":{"description":"The unique ID of the apply patch tool call generated by the model.","type":"string"},"created_by":{"description":"The ID of the entity that created this tool call.","type":"string"},"id":{"description":"The unique ID of the apply patch tool call. Populated when this item is returned via API.","type":"string"},"operation":{"description":"One of the create_file, delete_file, or update_file operations applied via apply_patch.","discriminator":{"mapping":{"create_file":"#/components/schemas/ApplyPatchCreateFileOperation","delete_file":"#/components/schemas/ApplyPatchDeleteFileOperation","update_file":"#/components/schemas/ApplyPatchUpdateFileOperation"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/ApplyPatchCreateFileOperation"},{"$ref":"#/components/schemas/ApplyPatchDeleteFileOperation"},{"$ref":"#/components/schemas/ApplyPatchUpdateFileOperation"}],"title":"Apply patch operation"},"status":{"$ref":"#/components/schemas/ApplyPatchCallStatus","description":"The status of the apply patch tool call. One of `in_progress` or `completed`."},"type":{"default":"apply_patch_call","description":"The type of the item. Always `apply_patch_call`.","enum":["apply_patch_call"],"type":"string","x-stainless-const":true}},"required":["type","id","call_id","status","operation"],"title":"Apply patch tool call","type":"object"},"ApplyPatchToolCallItemParam":{"description":"A tool call representing a request to create, delete, or update files using diff patches.","properties":{"call_id":{"description":"The unique ID of the apply patch tool call generated by the model.","maxLength":64,"minLength":1,"type":"string"},"id":{"anyOf":[{"description":"The unique ID of the apply patch tool call. Populated when this item is returned via API.","example":"apc_123","type":"string"},{"type":"null"}]},"operation":{"$ref":"#/components/schemas/ApplyPatchOperationParam","description":"The specific create, delete, or update instruction for the apply_patch tool call."},"status":{"$ref":"#/components/schemas/ApplyPatchCallStatusParam","description":"The status of the apply patch tool call. One of `in_progress` or `completed`."},"type":{"default":"apply_patch_call","description":"The type of the item. Always `apply_patch_call`.","enum":["apply_patch_call"],"type":"string","x-stainless-const":true}},"required":["type","call_id","status","operation"],"title":"Apply patch tool call","type":"object"},"ApplyPatchToolCallOutput":{"description":"The output emitted by an apply patch tool call.","properties":{"call_id":{"description":"The unique ID of the apply patch tool call generated by the model.","type":"string"},"created_by":{"description":"The ID of the entity that created this tool call output.","type":"string"},"id":{"description":"The unique ID of the apply patch tool call output. Populated when this item is returned via API.","type":"string"},"output":{"anyOf":[{"description":"Optional textual output returned by the apply patch tool.","type":"string"},{"type":"null"}]},"status":{"$ref":"#/components/schemas/ApplyPatchCallOutputStatus","description":"The status of the apply patch tool call output. One of `completed` or `failed`."},"type":{"default":"apply_patch_call_output","description":"The type of the item. Always `apply_patch_call_output`.","enum":["apply_patch_call_output"],"type":"string","x-stainless-const":true}},"required":["type","id","call_id","status"],"title":"Apply patch tool call output","type":"object"},"ApplyPatchToolCallOutputItemParam":{"description":"The streamed output emitted by an apply patch tool call.","properties":{"call_id":{"description":"The unique ID of the apply patch tool call generated by the model.","maxLength":64,"minLength":1,"type":"string"},"id":{"anyOf":[{"description":"The unique ID of the apply patch tool call output. Populated when this item is returned via API.","example":"apco_123","type":"string"},{"type":"null"}]},"output":{"anyOf":[{"description":"Optional human-readable log text from the apply patch tool (e.g., patch results or errors).","maxLength":10485760,"type":"string"},{"type":"null"}]},"status":{"$ref":"#/components/schemas/ApplyPatchCallOutputStatusParam","description":"The status of the apply patch tool call output. One of `completed` or `failed`."},"type":{"default":"apply_patch_call_output","description":"The type of the item. Always `apply_patch_call_output`.","enum":["apply_patch_call_output"],"type":"string","x-stainless-const":true}},"required":["type","call_id","status"],"title":"Apply patch tool call output","type":"object"},"ApplyPatchToolParam":{"additionalProperties":true,"description":"Opaque upstream schema placeholder for ApplyPatchToolParam; see overlay x-ohmygpt-opaque-upstream-schemas for rationale.","properties":{"type":{"type":"string"}},"required":["type"],"type":"object","x-ohmygpt-opaque":true,"x-ohmygpt-upstream-ref":"ApplyPatchToolParam"},"ApplyPatchUpdateFileOperation":{"description":"Instruction describing how to update a file via the apply_patch tool.","properties":{"diff":{"description":"Diff to apply.","type":"string"},"path":{"description":"Path of the file to update.","type":"string"},"type":{"default":"update_file","description":"Update an existing file with the provided diff.","enum":["update_file"],"type":"string","x-stainless-const":true}},"required":["type","path","diff"],"title":"Apply patch update file operation","type":"object"},"AttributionSourceId":{"description":"Identifier for the source contributing to this attribution.","type":"object","x-upstream-stub":true},"AudioResponseFormat":{"default":"json","description":"The format of the output, in one of these options: `json`, `text`, `srt`, `verbose_json`, `vtt`, or `diarized_json`. For `gpt-4o-transcribe` and `gpt-4o-mini-transcribe`, the only supported format is `json`. For `gpt-4o-transcribe-diarize`, the supported formats are `json`, `text`, and `diarized_json`, with `diarized_json` required to receive speaker annotations.\n","enum":["json","text","srt","verbose_json","vtt","diarized_json"],"type":"string"},"AudioTranscription":{"description":"The transcription of an audio part.\nFor multi-speaker audio, each speaker segment is a separate Part with its\nown AudioTranscription carrying the speaker_label.","type":"object","x-upstream-stub":true},"AudioTranscriptionConfig":{"description":"The audio transcription configuration.","properties":{"adaptationPhrases":{"deprecated":true,"description":"Optional. A list of phrases used for speech adaptation, which biases the ASR model to\nimprove recognition of these specific terms.","items":{"type":"string"},"type":"array"},"customVocabulary":{"description":"Optional. A list of custom vocabulary phrases to bias the speech recognition model\ntoward recognizing specific terms (product names, proper nouns, jargon).","items":{"type":"string"},"type":"array"},"diarization":{"description":"Optional. Configures speaker diarization.","type":"boolean"},"languageAuto":{"allOf":[{"$ref":"#/components/schemas/LanguageAuto"}],"deprecated":true,"description":"Optional. The model will detect the language automatically."},"languageCodes":{"description":"Optional. BCP-47 language codes providing hints about the languages present in the\naudio. If omitted or empty, defaults to automatic language detection.","items":{"type":"string"},"type":"array"},"languageHints":{"allOf":[{"$ref":"#/components/schemas/LanguageHints"}],"deprecated":true,"description":"Optional. Specifies one or more languages in the audio."},"mode":{"description":"Optional. Configures transcription mode. Supported values: `VERBATIM`,\n`SMART`. If unspecified, defaults to `VERBATIM` transcription.\nIn `SMART` mode, the model performs disfluency removal (eliminating\nfiller words, repetitions, and false starts), light grammatical cleanup,\nautomatic formatting (paragraphs, bullet points, numbered lists), and\nminor user edits (inline self-corrections).\nTimestamps and diarization are incompatible with mode `SMART`.","enum":["MODE_UNSPECIFIED","VERBATIM","SMART"],"type":"string"},"sourceText":{"description":"Optional. The source text to be edited or rewritten via voice instructions.\nWhen provided in `SMART` mode, the model evaluates the audio input against\nthis text and emits the complete replacement text in the candidate response\nrather than appending to it.","type":"string"},"wordTimestamp":{"description":"Optional. Configures word-level timestamp generation.","type":"boolean"}},"type":"object"},"AvailabilityHour":{"properties":{"affected_minutes":{"description":"Minutes in that hour with at least 10 samples of which fewer than 80% succeeded.","type":"integer"},"time":{"description":"Start of the hour (UTC).","format":"date-time","type":"string"},"uptime_pct":{"description":"Availability (%) in that hour; null until there are at least 20 samples.","nullable":true,"type":"number"}},"required":["time","uptime_pct","affected_minutes"],"type":"object"},"AvailabilityTrack":{"properties":{"affected_minutes":{"description":"Affected minutes over the 72 hours, counted as in `hourly`.","type":"integer"},"hourly":{"description":"72 hours, oldest first; the last entry is the current, unfinished hour.","items":{"$ref":"#/components/schemas/AvailabilityHour"},"type":"array"},"status":{"description":"Status over the last 15 minutes: operational at 95% success or more, degraded_performance at 80% or more, major_outage below that, no_data with fewer than 20 samples.\n","enum":["operational","degraded_performance","major_outage","no_data"],"type":"string"},"uptime_pct":{"description":"Availability (%) over the 72 hours; null until there are at least 20 samples.","nullable":true,"type":"number"}},"required":["status","uptime_pct","affected_minutes","hourly"],"type":"object"},"BYOKModelUsage":{"properties":{"cost_credits":{"description":"User charge in Credits for BYOK requests.","format":"int64","type":"integer"},"count":{"format":"int64","type":"integer"},"model":{"type":"string"}},"required":["model","cost_credits","count"],"type":"object"},"BYOKUsageSummary":{"properties":{"by_model":{"items":{"$ref":"#/components/schemas/BYOKModelUsage"},"type":"array"},"end":{"format":"date-time","type":"string"},"request_count":{"format":"int64","type":"integer"},"start":{"format":"date-time","type":"string"},"total_cost_credits":{"description":"Total user charge in Credits for BYOK requests.","format":"int64","type":"integer"}},"required":["start","end","by_model","total_cost_credits","request_count"],"type":"object"},"BashTool_20250124":{"additionalProperties":false,"properties":{"allowed_callers":{"items":{"enum":["direct","code_execution_20250825","code_execution_20260120"],"type":"string"},"title":"Allowed Callers","type":"array"},"cache_control":{"anyOf":[{"discriminator":{"mapping":{"ephemeral":"#/components/schemas/CacheControlEphemeral"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/CacheControlEphemeral"}]},{"type":"null"}],"description":"Create a cache control breakpoint at this content block.","title":"Cache Control"},"defer_loading":{"description":"If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.","title":"Defer Loading","type":"boolean"},"input_examples":{"items":{"additionalProperties":{"$ref":"#/components/schemas/JsonValue"},"type":"object"},"title":"Input Examples","type":"array"},"name":{"const":"bash","description":"Name of the tool.\n\nThis is how the tool will be called by the model and in `tool_use` blocks.","title":"Name","type":"string"},"strict":{"description":"When true, guarantees schema validation on tool names and inputs","title":"Strict","type":"boolean"},"type":{"const":"bash_20250124","title":"Type","type":"string"}},"required":["name","type"],"title":"BashTool_20250124","type":"object"},"Blob":{"description":"Raw media bytes.\n\nText should not be sent as raw bytes, use the 'text' field.","properties":{"data":{"description":"Raw bytes for media formats.","format":"byte","type":"string"},"displayName":{"description":"Optional. Specifies the name used to refer to this blob to the model (e.g.\n\"my_blob.png\"). Used as the blob reference identifier when\n`verbalization_mode` is set to `REFERENCE_ONLY`.","type":"string"},"mimeType":{"description":"The IANA standard MIME type of the source data.\nExamples of supported types:\n- Images: image/png, image/jpeg, image/jpg, image/webp, image/heic,\nimage/heif, image/gif, image/avif\n- Audio: audio/*, video/audio/s16le, video/audio/wav\n- Video: video/*\n- Text: text/plain, text/html, text/css, text/javascript,\ntext/x-typescript, text/csv, text/markdown, text/x-python, text/xml,\ntext/rtf, video/text/timestamp\n- Applications: application/x-javascript, application/x-typescript,\napplication/x-python-code, application/json, application/x-ipynb+json,\napplication/rtf, application/pdf For additional context,\nsee [Supported file\nformats](https://aistudio.google.com/docs/file-input-methods#supported-content-types).","type":"string"}},"type":"object"},"CacheControlEphemeral":{"additionalProperties":false,"properties":{"ttl":{"description":"The time-to-live for the cache control breakpoint.\n\nThis may be one the following values:\n- `5m`: 5 minutes\n- `1h`: 1 hour\n\nDefaults to `5m`.","enum":["5m","1h"],"title":"Ttl","type":"string"},"type":{"const":"ephemeral","title":"Type","type":"string"}},"required":["type"],"title":"CacheControlEphemeral","type":"object"},"CacheCreation":{"properties":{"ephemeral_1h_input_tokens":{"default":0,"description":"The number of input tokens used to create the 1 hour cache entry.","minimum":0,"title":"Ephemeral 1H Input Tokens","type":"integer"},"ephemeral_5m_input_tokens":{"default":0,"description":"The number of input tokens used to create the 5 minute cache entry.","minimum":0,"title":"Ephemeral 5M Input Tokens","type":"integer"}},"required":["ephemeral_1h_input_tokens","ephemeral_5m_input_tokens"],"title":"CacheCreation","type":"object"},"Candidate":{"description":"A response candidate generated from the model.","properties":{"avgLogprobs":{"description":"Output only. Average log probability score of the candidate.","format":"double","readOnly":true,"type":"number"},"citationMetadata":{"allOf":[{"$ref":"#/components/schemas/CitationMetadata"}],"description":"Output only. Citation information for model-generated candidate.\n\nThis field may be populated with recitation information for any text\nincluded in the `content`. These are passages that are \"recited\" from\ncopyrighted material in the foundational LLM's training data.","readOnly":true},"content":{"allOf":[{"$ref":"#/components/schemas/Content"}],"description":"Output only. Generated content returned from the model.","readOnly":true},"continuationToken":{"description":"An optional opaque continuation token returned when `finish_reason` is\n`CONTINUATION`.\nClients can pass this token in a subsequent `GenerateContentRequest` to\ncontinue generation.","format":"byte","type":"string"},"finishMessage":{"description":"Optional. Output only. Details the reason why the model stopped generating tokens.\nThis is populated only when `finish_reason` is set.","readOnly":true,"type":"string"},"finishReason":{"description":"Optional. Output only. The reason why the model stopped generating tokens.\n\nIf empty, the model has not stopped generating tokens.","enum":["FINISH_REASON_UNSPECIFIED","STOP","MAX_TOKENS","SAFETY","RECITATION","LANGUAGE","OTHER","BLOCKLIST","PROHIBITED_CONTENT","SPII","MALFORMED_FUNCTION_CALL","IMAGE_SAFETY","IMAGE_PROHIBITED_CONTENT","IMAGE_OTHER","NO_IMAGE","IMAGE_RECITATION","UNEXPECTED_TOOL_CALL","TOO_MANY_TOOL_CALLS","MISSING_THOUGHT_SIGNATURE","MALFORMED_RESPONSE","ESCALATION","PUP_LIMITED_DISABLED","CONTINUATION"],"readOnly":true,"type":"string"},"groundingAttributions":{"description":"Output only. Attribution information for sources that contributed to a grounded answer.\n\nThis field is populated for `GenerateAnswer` calls.","items":{"$ref":"#/components/schemas/GroundingAttribution"},"readOnly":true,"type":"array"},"groundingMetadata":{"allOf":[{"$ref":"#/components/schemas/GroundingMetadata"}],"description":"Output only. Grounding metadata for the candidate.\n\nThis field is populated for `GenerateContent` calls.","readOnly":true},"index":{"description":"Output only. Index of the candidate in the list of response candidates.","format":"int32","readOnly":true,"type":"integer"},"logprobsResult":{"allOf":[{"$ref":"#/components/schemas/LogprobsResult"}],"description":"Output only. Log-likelihood scores for the response tokens and top tokens","readOnly":true},"safetyRatings":{"description":"List of ratings for the safety of a response candidate.\n\nThere is at most one rating per category.","items":{"$ref":"#/components/schemas/SafetyRating"},"type":"array"},"tokenCount":{"description":"Output only. Token count for this candidate.","format":"int32","readOnly":true,"type":"integer"},"urlContextMetadata":{"allOf":[{"$ref":"#/components/schemas/UrlContextMetadata"}],"description":"Output only. Metadata related to url context retrieval tool.","readOnly":true}},"type":"object"},"CapabilityIndex":{"description":"General capability score from the Epoch Capabilities Index (Epoch AI, epoch.ai/eci, CC BY 4.0), which places models on one scale across many benchmarks even when they were evaluated on different ones. GPT-5 is anchored at 150. Credit Epoch AI wherever the score is shown. Omitted when the index does not cover the model.","properties":{"as_of":{"description":"Date the score was taken from the index (YYYY-MM-DD).","type":"string"},"ci_high":{"description":"Upper bound of the confidence interval; omitted for the anchor model.","type":"number"},"ci_low":{"description":"Lower bound of the confidence interval; omitted for the anchor model.","type":"number"},"score":{"type":"number"}},"required":["score","as_of"],"type":"object"},"ChatCompletionAllowedTools":{"description":"Constrains the tools available to the model to a pre-defined set.\n","properties":{"mode":{"description":"Constrains the tools available to the model to a pre-defined set.\n\n`auto` allows the model to pick from among the allowed tools and generate a\nmessage.\n\n`required` requires the model to call one or more of the allowed tools.\n","enum":["auto","required"],"type":"string"},"tools":{"description":"A list of tool definitions that the model should be allowed to call.\n\nFor the Chat Completions API, the list of tool definitions might look like:\n```json\n[\n  { \"type\": \"function\", \"function\": { \"name\": \"get_weather\" } },\n  { \"type\": \"function\", \"function\": { \"name\": \"get_time\" } }\n]\n```\n","items":{"additionalProperties":true,"description":"A tool definition that the model should be allowed to call.\n","type":"object","x-oaiExpandable":false},"type":"array"}},"required":["mode","tools"],"title":"Allowed tools","type":"object"},"ChatCompletionAllowedToolsChoice":{"description":"Constrains the tools available to the model to a pre-defined set.\n","properties":{"allowed_tools":{"$ref":"#/components/schemas/ChatCompletionAllowedTools"},"type":{"description":"Allowed tool configuration type. Always `allowed_tools`.","enum":["allowed_tools"],"type":"string","x-stainless-const":true}},"required":["type","allowed_tools"],"title":"Allowed tools","type":"object"},"ChatCompletionFunctionCallOption":{"description":"Specifying a particular function via `{\"name\": \"my_function\"}` forces the model to call that function.\n","properties":{"name":{"description":"The name of the function to call.","type":"string"}},"required":["name"],"type":"object"},"ChatCompletionFunctions":{"deprecated":true,"properties":{"description":{"description":"A description of what the function does, used by the model to choose when and how to call the function.","type":"string"},"name":{"description":"The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.","type":"string"},"parameters":{"$ref":"#/components/schemas/FunctionParameters"}},"required":["name"],"type":"object"},"ChatCompletionMessageCustomToolCall":{"description":"A call to a custom tool created by the model.\n","properties":{"custom":{"description":"The custom tool that the model called.","properties":{"input":{"description":"The input for the custom tool call generated by the model.","type":"string"},"name":{"description":"The name of the custom tool to call.","type":"string"}},"required":["name","input"],"type":"object"},"id":{"description":"The ID of the tool call.","type":"string"},"type":{"description":"The type of the tool. Always `custom`.","enum":["custom"],"type":"string","x-stainless-const":true}},"required":["id","type","custom"],"title":"Custom tool call","type":"object"},"ChatCompletionMessageToolCall":{"description":"A call to a function tool created by the model.\n","properties":{"function":{"description":"The function that the model called.","properties":{"arguments":{"description":"The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.","type":"string"},"name":{"description":"The name of the function to call.","type":"string"}},"required":["name","arguments"],"type":"object"},"id":{"description":"The ID of the tool call.","type":"string"},"type":{"description":"The type of the tool. Currently, only `function` is supported.","enum":["function"],"type":"string","x-stainless-const":true}},"required":["id","type","function"],"title":"Function tool call","type":"object"},"ChatCompletionMessageToolCallChunk":{"properties":{"function":{"properties":{"arguments":{"description":"The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.","type":"string"},"name":{"description":"The name of the function to call.","type":"string"}},"type":"object"},"id":{"description":"The ID of the tool call.","type":"string"},"index":{"type":"integer"},"type":{"description":"The type of the tool. Currently, only `function` is supported.","enum":["function"],"type":"string","x-stainless-const":true}},"required":["index"],"type":"object"},"ChatCompletionMessageToolCalls":{"description":"The tool calls generated by the model, such as function calls.","items":{"discriminator":{"mapping":{"custom":"#/components/schemas/ChatCompletionMessageCustomToolCall","function":"#/components/schemas/ChatCompletionMessageToolCall"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/ChatCompletionMessageToolCall"},{"$ref":"#/components/schemas/ChatCompletionMessageCustomToolCall"}]},"type":"array"},"ChatCompletionNamedToolChoice":{"description":"Specifies a tool the model should use. Use to force the model to call a specific function.","properties":{"function":{"properties":{"name":{"description":"The name of the function to call.","type":"string"}},"required":["name"],"type":"object"},"type":{"description":"For function calling, the type is always `function`.","enum":["function"],"type":"string","x-stainless-const":true}},"required":["type","function"],"title":"Function tool choice","type":"object"},"ChatCompletionNamedToolChoiceCustom":{"description":"Specifies a tool the model should use. Use to force the model to call a specific custom tool.","properties":{"custom":{"properties":{"name":{"description":"The name of the custom tool to call.","type":"string"}},"required":["name"],"type":"object"},"type":{"description":"For custom tool calling, the type is always `custom`.","enum":["custom"],"type":"string","x-stainless-const":true}},"required":["type","custom"],"title":"Custom tool choice","type":"object"},"ChatCompletionRequestAssistantMessage":{"description":"Messages sent by the model in response to user messages.\n","properties":{"audio":{"anyOf":[{"description":"Data about a previous audio response from the model.\n[Learn more](https://platform.openai.com/docs/guides/audio).\n","properties":{"id":{"description":"Unique identifier for a previous audio response from the model.\n","type":"string"}},"required":["id"],"type":"object"},{"type":"null"}]},"content":{"anyOf":[{"description":"The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.\n","oneOf":[{"description":"The contents of the assistant message.","title":"Text content","type":"string"},{"description":"An array of content parts with a defined type. Can be one or more of type `text`, or exactly one of type `refusal`.","items":{"$ref":"#/components/schemas/ChatCompletionRequestAssistantMessageContentPart"},"minItems":1,"title":"Array of content parts","type":"array"}]},{"type":"null"}]},"function_call":{"anyOf":[{"deprecated":true,"description":"Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.","properties":{"arguments":{"description":"The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.","type":"string"},"name":{"description":"The name of the function to call.","type":"string"}},"required":["arguments","name"],"type":"object"},{"type":"null"}]},"name":{"description":"An optional name for the participant. Provides the model information to differentiate between participants of the same role.","type":"string"},"refusal":{"anyOf":[{"description":"The refusal message by the assistant.","type":"string"},{"type":"null"}]},"role":{"description":"The role of the messages author, in this case `assistant`.","enum":["assistant"],"type":"string","x-stainless-const":true},"tool_calls":{"$ref":"#/components/schemas/ChatCompletionMessageToolCalls"}},"required":["role"],"title":"Assistant message","type":"object"},"ChatCompletionRequestAssistantMessageContentPart":{"discriminator":{"mapping":{"refusal":"#/components/schemas/ChatCompletionRequestMessageContentPartRefusal","text":"#/components/schemas/ChatCompletionRequestMessageContentPartText"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/ChatCompletionRequestMessageContentPartText"},{"$ref":"#/components/schemas/ChatCompletionRequestMessageContentPartRefusal"}]},"ChatCompletionRequestDeveloperMessage":{"description":"Developer-provided instructions that the model should follow, regardless of\nmessages sent by the user. With o1 models and newer, `developer` messages\nreplace the previous `system` messages.\n","properties":{"content":{"description":"The contents of the developer message.","oneOf":[{"description":"The contents of the developer message.","title":"Text content","type":"string"},{"description":"An array of content parts with a defined type. For developer messages, only type `text` is supported.","items":{"$ref":"#/components/schemas/ChatCompletionRequestMessageContentPartText"},"minItems":1,"title":"Array of content parts","type":"array"}]},"name":{"description":"An optional name for the participant. Provides the model information to differentiate between participants of the same role.","type":"string"},"role":{"description":"The role of the messages author, in this case `developer`.","enum":["developer"],"type":"string","x-stainless-const":true}},"required":["content","role"],"title":"Developer message","type":"object"},"ChatCompletionRequestFunctionMessage":{"deprecated":true,"properties":{"content":{"anyOf":[{"description":"The contents of the function message.","type":"string"},{"type":"null"}]},"name":{"description":"The name of the function to call.","type":"string"},"role":{"description":"The role of the messages author, in this case `function`.","enum":["function"],"type":"string","x-stainless-const":true}},"required":["role","content","name"],"title":"Function message","type":"object"},"ChatCompletionRequestMessage":{"discriminator":{"mapping":{"assistant":"#/components/schemas/ChatCompletionRequestAssistantMessage","developer":"#/components/schemas/ChatCompletionRequestDeveloperMessage","function":"#/components/schemas/ChatCompletionRequestFunctionMessage","system":"#/components/schemas/ChatCompletionRequestSystemMessage","tool":"#/components/schemas/ChatCompletionRequestToolMessage","user":"#/components/schemas/ChatCompletionRequestUserMessage"},"propertyName":"role"},"oneOf":[{"$ref":"#/components/schemas/ChatCompletionRequestDeveloperMessage"},{"$ref":"#/components/schemas/ChatCompletionRequestSystemMessage"},{"$ref":"#/components/schemas/ChatCompletionRequestUserMessage"},{"$ref":"#/components/schemas/ChatCompletionRequestAssistantMessage"},{"$ref":"#/components/schemas/ChatCompletionRequestToolMessage"},{"$ref":"#/components/schemas/ChatCompletionRequestFunctionMessage"}]},"ChatCompletionRequestMessageContentPartAudio":{"description":"Learn about [audio inputs](https://platform.openai.com/docs/guides/audio).\n","properties":{"input_audio":{"properties":{"data":{"description":"Base64 encoded audio data.","type":"string"},"format":{"description":"The format of the encoded audio data. Currently supports \"wav\" and \"mp3\".\n","enum":["wav","mp3"],"type":"string"}},"required":["data","format"],"type":"object"},"type":{"description":"The type of the content part. Always `input_audio`.","enum":["input_audio"],"type":"string","x-stainless-const":true}},"required":["type","input_audio"],"title":"Audio content part","type":"object"},"ChatCompletionRequestMessageContentPartFile":{"description":"Learn about [file inputs](https://platform.openai.com/docs/guides/text) for text generation.\n","properties":{"file":{"properties":{"file_data":{"description":"The base64 encoded file data, used when passing the file to the model \nas a string.\n","type":"string"},"file_id":{"description":"The ID of an uploaded file to use as input.\n","type":"string"},"filename":{"description":"The name of the file, used when passing the file to the model as a \nstring.\n","type":"string"}},"type":"object"},"type":{"description":"The type of the content part. Always `file`.","enum":["file"],"type":"string","x-stainless-const":true}},"required":["type","file"],"title":"File content part","type":"object"},"ChatCompletionRequestMessageContentPartImage":{"description":"Learn about [image inputs](https://platform.openai.com/docs/guides/vision).\n","properties":{"image_url":{"properties":{"detail":{"default":"auto","description":"Specifies the detail level of the image. Learn more in the [Vision guide](https://platform.openai.com/docs/guides/vision#low-or-high-fidelity-image-understanding).","enum":["auto","low","high"],"type":"string"},"url":{"description":"Either a URL of the image or the base64 encoded image data.","format":"uri","type":"string"}},"required":["url"],"type":"object"},"type":{"description":"The type of the content part.","enum":["image_url"],"type":"string","x-stainless-const":true}},"required":["type","image_url"],"title":"Image content part","type":"object"},"ChatCompletionRequestMessageContentPartRefusal":{"properties":{"refusal":{"description":"The refusal message generated by the model.","type":"string"},"type":{"description":"The type of the content part.","enum":["refusal"],"type":"string","x-stainless-const":true}},"required":["type","refusal"],"title":"Refusal content part","type":"object"},"ChatCompletionRequestMessageContentPartText":{"description":"Learn about [text inputs](https://platform.openai.com/docs/guides/text-generation).\n","properties":{"text":{"description":"The text content.","type":"string"},"type":{"description":"The type of the content part.","enum":["text"],"type":"string","x-stainless-const":true}},"required":["type","text"],"title":"Text content part","type":"object"},"ChatCompletionRequestSystemMessage":{"description":"Developer-provided instructions that the model should follow, regardless of\nmessages sent by the user. With o1 models and newer, use `developer` messages\nfor this purpose instead.\n","properties":{"content":{"description":"The contents of the system message.","oneOf":[{"description":"The contents of the system message.","title":"Text content","type":"string"},{"description":"An array of content parts with a defined type. For system messages, only type `text` is supported.","items":{"$ref":"#/components/schemas/ChatCompletionRequestSystemMessageContentPart"},"minItems":1,"title":"Array of content parts","type":"array"}]},"name":{"description":"An optional name for the participant. Provides the model information to differentiate between participants of the same role.","type":"string"},"role":{"description":"The role of the messages author, in this case `system`.","enum":["system"],"type":"string","x-stainless-const":true}},"required":["content","role"],"title":"System message","type":"object"},"ChatCompletionRequestSystemMessageContentPart":{"oneOf":[{"$ref":"#/components/schemas/ChatCompletionRequestMessageContentPartText"}]},"ChatCompletionRequestToolMessage":{"properties":{"content":{"description":"The contents of the tool message.","oneOf":[{"description":"The contents of the tool message.","title":"Text content","type":"string"},{"description":"An array of content parts with a defined type. For tool messages, only type `text` is supported.","items":{"$ref":"#/components/schemas/ChatCompletionRequestToolMessageContentPart"},"minItems":1,"title":"Array of content parts","type":"array"}]},"role":{"description":"The role of the messages author, in this case `tool`.","enum":["tool"],"type":"string","x-stainless-const":true},"tool_call_id":{"description":"Tool call that this message is responding to.","type":"string"}},"required":["role","content","tool_call_id"],"title":"Tool message","type":"object"},"ChatCompletionRequestToolMessageContentPart":{"oneOf":[{"$ref":"#/components/schemas/ChatCompletionRequestMessageContentPartText"}]},"ChatCompletionRequestUserMessage":{"description":"Messages sent by an end user, containing prompts or additional context\ninformation.\n","properties":{"content":{"description":"The contents of the user message.\n","oneOf":[{"description":"The text contents of the message.","title":"Text content","type":"string"},{"description":"An array of content parts with a defined type. Supported options differ based on the [model](https://platform.openai.com/docs/models) being used to generate the response. Can contain text, image, or audio inputs.","items":{"$ref":"#/components/schemas/ChatCompletionRequestUserMessageContentPart"},"minItems":1,"title":"Array of content parts","type":"array"}]},"name":{"description":"An optional name for the participant. Provides the model information to differentiate between participants of the same role.","type":"string"},"role":{"description":"The role of the messages author, in this case `user`.","enum":["user"],"type":"string","x-stainless-const":true}},"required":["content","role"],"title":"User message","type":"object"},"ChatCompletionRequestUserMessageContentPart":{"oneOf":[{"$ref":"#/components/schemas/ChatCompletionRequestMessageContentPartText"},{"$ref":"#/components/schemas/ChatCompletionRequestMessageContentPartImage"},{"$ref":"#/components/schemas/ChatCompletionRequestMessageContentPartAudio"},{"$ref":"#/components/schemas/ChatCompletionRequestMessageContentPartFile"}]},"ChatCompletionResponseMessage":{"description":"A chat completion message generated by the model.","properties":{"annotations":{"description":"Annotations for the message, when applicable, as when using the\n[web search tool](https://platform.openai.com/docs/guides/tools-web-search?api-mode=chat).\n","items":{"description":"A URL citation when using web search.\n","properties":{"type":{"description":"The type of the URL citation. Always `url_citation`.","enum":["url_citation"],"type":"string","x-stainless-const":true},"url_citation":{"description":"A URL citation when using web search.","properties":{"end_index":{"description":"The index of the last character of the URL citation in the message.","type":"integer"},"start_index":{"description":"The index of the first character of the URL citation in the message.","type":"integer"},"title":{"description":"The title of the web resource.","type":"string"},"url":{"description":"The URL of the web resource.","type":"string"}},"required":["end_index","start_index","url","title"],"type":"object"}},"required":["type","url_citation"],"type":"object"},"type":"array"},"audio":{"anyOf":[{"description":"If the audio output modality is requested, this object contains data\nabout the audio response from the model. [Learn more](https://platform.openai.com/docs/guides/audio).\n","properties":{"data":{"description":"Base64 encoded audio bytes generated by the model, in the format\nspecified in the request.\n","type":"string"},"expires_at":{"description":"The Unix timestamp (in seconds) for when this audio response will\nno longer be accessible on the server for use in multi-turn\nconversations.\n","type":"integer"},"id":{"description":"Unique identifier for this audio response.","type":"string"},"transcript":{"description":"Transcript of the audio generated by the model.","type":"string"}},"required":["id","expires_at","data","transcript"],"type":"object"},{"type":"null"}]},"content":{"anyOf":[{"description":"The contents of the message.","type":"string"},{"type":"null"}]},"function_call":{"deprecated":true,"description":"Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.","properties":{"arguments":{"description":"The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.","type":"string"},"name":{"description":"The name of the function to call.","type":"string"}},"required":["name","arguments"],"type":"object"},"refusal":{"anyOf":[{"description":"The refusal message generated by the model.","type":"string"},{"type":"null"}]},"role":{"description":"The role of the author of this message.","enum":["assistant"],"type":"string","x-stainless-const":true},"tool_calls":{"$ref":"#/components/schemas/ChatCompletionMessageToolCalls"}},"required":["role","content","refusal"],"type":"object"},"ChatCompletionStreamOptions":{"anyOf":[{"default":null,"description":"Options for streaming response. Only set this when you set `stream: true`.\n","properties":{"include_obfuscation":{"description":"When true, stream obfuscation will be enabled. Stream obfuscation adds\nrandom characters to an `obfuscation` field on streaming delta events to\nnormalize payload sizes as a mitigation to certain side-channel attacks.\nThese obfuscation fields are included by default, but add a small amount\nof overhead to the data stream. You can set `include_obfuscation` to\nfalse to optimize for bandwidth if you trust the network links between\nyour application and the OpenAI API.\n","type":"boolean"},"include_usage":{"description":"If set, an additional chunk will be streamed before the `data: [DONE]`\nmessage. The `usage` field on this chunk shows the token usage statistics\nfor the entire request, and the `choices` field will always be an empty\narray.\n\nAll other chunks will also include a `usage` field, but with a null\nvalue. **NOTE:** If the stream is interrupted, you may not receive the\nfinal usage chunk which contains the total token usage for the request.\n","type":"boolean"}},"type":"object"},{"type":"null"}]},"ChatCompletionStreamResponseDelta":{"description":"A chat completion delta generated by streamed model responses.","properties":{"content":{"anyOf":[{"description":"The contents of the chunk message.","type":"string"},{"type":"null"}]},"function_call":{"deprecated":true,"description":"Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.","properties":{"arguments":{"description":"The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.","type":"string"},"name":{"description":"The name of the function to call.","type":"string"}},"type":"object"},"refusal":{"anyOf":[{"description":"The refusal message generated by the model.","type":"string"},{"type":"null"}]},"role":{"description":"The role of the author of this message.","enum":["developer","system","user","assistant","tool"],"type":"string"},"tool_calls":{"items":{"$ref":"#/components/schemas/ChatCompletionMessageToolCallChunk"},"type":"array"}},"type":"object"},"ChatCompletionTokenLogprob":{"properties":{"bytes":{"anyOf":[{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","items":{"type":"integer"},"type":"array"},{"type":"null"}]},"logprob":{"description":"The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.","type":"number"},"token":{"description":"The token.","type":"string"},"top_logprobs":{"description":"List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested `top_logprobs` returned.","items":{"properties":{"bytes":{"anyOf":[{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.","items":{"type":"integer"},"type":"array"},{"type":"null"}]},"logprob":{"description":"The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.","type":"number"},"token":{"description":"The token.","type":"string"}},"required":["token","logprob","bytes"],"type":"object"},"type":"array"}},"required":["token","logprob","bytes","top_logprobs"],"type":"object"},"ChatCompletionTool":{"description":"A function tool that can be used to generate a response.\n","properties":{"function":{"$ref":"#/components/schemas/FunctionObject"},"type":{"description":"The type of the tool. Currently, only `function` is supported.","enum":["function"],"type":"string","x-stainless-const":true}},"required":["type","function"],"title":"Function tool","type":"object"},"ChatCompletionToolChoiceOption":{"description":"Controls which (if any) tool is called by the model.\n`none` means the model will not call any tool and instead generates a message.\n`auto` means the model can pick between generating a message or calling one or more tools.\n`required` means the model must call one or more tools.\nSpecifying a particular tool via `{\"type\": \"function\", \"function\": {\"name\": \"my_function\"}}` forces the model to call that tool.\n\n`none` is the default when no tools are present. `auto` is the default if tools are present.\n","oneOf":[{"description":"`none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `required` means the model must call one or more tools.\n","enum":["none","auto","required"],"title":"Tool choice mode","type":"string"},{"$ref":"#/components/schemas/ChatCompletionAllowedToolsChoice"},{"$ref":"#/components/schemas/ChatCompletionNamedToolChoice"},{"$ref":"#/components/schemas/ChatCompletionNamedToolChoiceCustom"}]},"ChatMetadata":{"anyOf":[{"additionalProperties":{"type":"string"},"description":"Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard.\n\nKeys are strings with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.\n","type":"object","x-oaiTypeLabel":"map"},{"type":"null"}]},"CitationMetadata":{"description":"A collection of source attributions for a piece of content.","properties":{"citationSources":{"description":"Citations to sources for a specific response.","items":{"$ref":"#/components/schemas/CitationSource"},"type":"array"}},"type":"object"},"CitationSource":{"description":"A citation to a source for a portion of a specific response.","type":"object","x-upstream-stub":true},"ClickParam":{"additionalProperties":true,"description":"Opaque upstream schema placeholder for ClickParam; see overlay x-ohmygpt-opaque-upstream-schemas for rationale.","properties":{"type":{"type":"string"}},"required":["type"],"type":"object","x-ohmygpt-opaque":true,"x-ohmygpt-upstream-ref":"ClickParam"},"CodeExecution":{"description":"Tool that executes code generated by the model, and automatically returns\nthe result to the model.\n\nSee also `ExecutableCode` and `CodeExecutionResult` which are only generated\nwhen using this tool.","type":"object"},"CodeExecutionResult":{"description":"Result of executing the `ExecutableCode`.","type":"object","x-upstream-stub":true},"CodeExecutionTool_20250522":{"additionalProperties":false,"properties":{"allowed_callers":{"items":{"enum":["direct","code_execution_20250825","code_execution_20260120"],"type":"string"},"title":"Allowed Callers","type":"array"},"cache_control":{"anyOf":[{"discriminator":{"mapping":{"ephemeral":"#/components/schemas/CacheControlEphemeral"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/CacheControlEphemeral"}]},{"type":"null"}],"description":"Create a cache control breakpoint at this content block.","title":"Cache Control"},"defer_loading":{"description":"If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.","title":"Defer Loading","type":"boolean"},"name":{"const":"code_execution","description":"Name of the tool.\n\nThis is how the tool will be called by the model and in `tool_use` blocks.","title":"Name","type":"string"},"strict":{"description":"When true, guarantees schema validation on tool names and inputs","title":"Strict","type":"boolean"},"type":{"const":"code_execution_20250522","title":"Type","type":"string"}},"required":["name","type"],"title":"CodeExecutionTool_20250522","type":"object"},"CodeExecutionTool_20250825":{"additionalProperties":false,"properties":{"allowed_callers":{"items":{"enum":["direct","code_execution_20250825","code_execution_20260120"],"type":"string"},"title":"Allowed Callers","type":"array"},"cache_control":{"anyOf":[{"discriminator":{"mapping":{"ephemeral":"#/components/schemas/CacheControlEphemeral"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/CacheControlEphemeral"}]},{"type":"null"}],"description":"Create a cache control breakpoint at this content block.","title":"Cache Control"},"defer_loading":{"description":"If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.","title":"Defer Loading","type":"boolean"},"name":{"const":"code_execution","description":"Name of the tool.\n\nThis is how the tool will be called by the model and in `tool_use` blocks.","title":"Name","type":"string"},"strict":{"description":"When true, guarantees schema validation on tool names and inputs","title":"Strict","type":"boolean"},"type":{"const":"code_execution_20250825","title":"Type","type":"string"}},"required":["name","type"],"title":"CodeExecutionTool_20250825","type":"object"},"CodeExecutionTool_20260120":{"additionalProperties":false,"description":"Code execution tool with REPL state persistence (daemon mode + gVisor checkpoint).","properties":{"allowed_callers":{"items":{"enum":["direct","code_execution_20250825","code_execution_20260120"],"type":"string"},"title":"Allowed Callers","type":"array"},"cache_control":{"anyOf":[{"discriminator":{"mapping":{"ephemeral":"#/components/schemas/CacheControlEphemeral"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/CacheControlEphemeral"}]},{"type":"null"}],"description":"Create a cache control breakpoint at this content block.","title":"Cache Control"},"defer_loading":{"description":"If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.","title":"Defer Loading","type":"boolean"},"name":{"const":"code_execution","description":"Name of the tool.\n\nThis is how the tool will be called by the model and in `tool_use` blocks.","title":"Name","type":"string"},"strict":{"description":"When true, guarantees schema validation on tool names and inputs","title":"Strict","type":"boolean"},"type":{"const":"code_execution_20260120","title":"Type","type":"string"}},"required":["name","type"],"title":"CodeExecutionTool_20260120","type":"object"},"CodeInterpreterOutputImage":{"description":"The image output from the code interpreter.","properties":{"type":{"default":"image","description":"The type of the output. Always `image`.","enum":["image"],"type":"string","x-stainless-const":true},"url":{"description":"The URL of the image output from the code interpreter.","type":"string"}},"required":["type","url"],"title":"Code interpreter output image","type":"object"},"CodeInterpreterOutputLogs":{"description":"The logs output from the code interpreter.","properties":{"logs":{"description":"The logs output from the code interpreter.","type":"string"},"type":{"default":"logs","description":"The type of the output. Always `logs`.","enum":["logs"],"type":"string","x-stainless-const":true}},"required":["type","logs"],"title":"Code interpreter output logs","type":"object"},"CodeInterpreterTool":{"additionalProperties":true,"description":"Opaque upstream schema placeholder for CodeInterpreterTool; see overlay x-ohmygpt-opaque-upstream-schemas for rationale.","properties":{"type":{"type":"string"}},"required":["type"],"type":"object","x-ohmygpt-opaque":true,"x-ohmygpt-upstream-ref":"CodeInterpreterTool"},"CodeInterpreterToolCall":{"description":"A tool call to run code.\n","properties":{"code":{"anyOf":[{"description":"The code to run, or null if not available.\n","type":"string"},{"type":"null"}]},"container_id":{"description":"The ID of the container used to run the code.\n","type":"string"},"id":{"description":"The unique ID of the code interpreter tool call.\n","type":"string"},"outputs":{"anyOf":[{"description":"The outputs generated by the code interpreter, such as logs or images.\nCan be null if no outputs are available.\n","discriminator":{"propertyName":"type"},"items":{"discriminator":{"mapping":{"image":"#/components/schemas/CodeInterpreterOutputImage","logs":"#/components/schemas/CodeInterpreterOutputLogs"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/CodeInterpreterOutputLogs"},{"$ref":"#/components/schemas/CodeInterpreterOutputImage"}]},"type":"array"},{"type":"null"}]},"status":{"description":"The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.\n","enum":["in_progress","completed","incomplete","interpreting","failed"],"type":"string"},"type":{"default":"code_interpreter_call","description":"The type of the code interpreter tool call. Always `code_interpreter_call`.\n","enum":["code_interpreter_call"],"type":"string","x-stainless-const":true}},"required":["type","id","status","container_id","code","outputs"],"title":"Code interpreter tool call","type":"object"},"CompactionBody":{"description":"A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact).","properties":{"created_by":{"description":"The identifier of the actor that created the item.","type":"string"},"encrypted_content":{"description":"The encrypted content that was produced by compaction.","type":"string"},"id":{"description":"The unique ID of the compaction item.","type":"string"},"type":{"default":"compaction","description":"The type of the item. Always `compaction`.","enum":["compaction"],"type":"string","x-stainless-const":true}},"required":["type","id","encrypted_content"],"title":"Compaction item","type":"object"},"CompactionSummaryItemParam":{"description":"A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact).","properties":{"encrypted_content":{"description":"The encrypted content of the compaction summary.","maxLength":10485760,"type":"string"},"id":{"anyOf":[{"description":"The ID of the compaction item.","example":"cmp_123","type":"string"},{"type":"null"}]},"type":{"default":"compaction","description":"The type of the item. Always `compaction`.","enum":["compaction"],"type":"string","x-stainless-const":true}},"required":["type","encrypted_content"],"title":"Compaction item","type":"object"},"CompletionUsage":{"description":"Usage statistics for the completion request.","properties":{"completion_tokens":{"default":0,"description":"Number of tokens in the generated completion.","type":"integer"},"completion_tokens_details":{"description":"Breakdown of tokens used in a completion.","properties":{"accepted_prediction_tokens":{"default":0,"description":"When using Predicted Outputs, the number of tokens in the\nprediction that appeared in the completion.\n","type":"integer"},"audio_tokens":{"default":0,"description":"Audio input tokens generated by the model.","type":"integer"},"reasoning_tokens":{"default":0,"description":"Tokens generated by the model for reasoning.","type":"integer"},"rejected_prediction_tokens":{"default":0,"description":"When using Predicted Outputs, the number of tokens in the\nprediction that did not appear in the completion. However, like\nreasoning tokens, these tokens are still counted in the total\ncompletion tokens for purposes of output and context window\nlimits.\n","type":"integer"}},"type":"object"},"prompt_tokens":{"default":0,"description":"Number of tokens in the prompt.","type":"integer"},"prompt_tokens_details":{"description":"Breakdown of tokens used in the prompt.","properties":{"audio_tokens":{"default":0,"description":"Audio input tokens present in the prompt.","type":"integer"},"cached_tokens":{"default":0,"description":"Cached tokens present in the prompt.","type":"integer"}},"type":"object"},"total_tokens":{"default":0,"description":"Total number of tokens used in the request (prompt + completion).","type":"integer"}},"required":["prompt_tokens","completion_tokens","total_tokens"],"type":"object"},"ComputerAction":{"oneOf":[{"$ref":"#/components/schemas/ClickParam"},{"$ref":"#/components/schemas/DoubleClickAction"},{"$ref":"#/components/schemas/DragParam"},{"$ref":"#/components/schemas/KeyPressAction"},{"$ref":"#/components/schemas/MoveParam"},{"$ref":"#/components/schemas/ScreenshotParam"},{"$ref":"#/components/schemas/ScrollParam"},{"$ref":"#/components/schemas/TypeParam"},{"$ref":"#/components/schemas/WaitParam"}]},"ComputerCallOutputItemParam":{"description":"The output of a computer tool call.","properties":{"acknowledged_safety_checks":{"anyOf":[{"description":"The safety checks reported by the API that have been acknowledged by the developer.","items":{"$ref":"#/components/schemas/ComputerCallSafetyCheckParam"},"type":"array"},{"type":"null"}]},"call_id":{"description":"The ID of the computer tool call that produced the output.","maxLength":64,"minLength":1,"type":"string"},"id":{"anyOf":[{"description":"The ID of the computer tool call output.","example":"cuo_123","type":"string"},{"type":"null"}]},"output":{"$ref":"#/components/schemas/ComputerScreenshotImage"},"status":{"anyOf":[{"$ref":"#/components/schemas/FunctionCallItemStatus","description":"The status of the message input. One of `in_progress`, `completed`, or `incomplete`. Populated when input items are returned via API."},{"type":"null"}]},"type":{"default":"computer_call_output","description":"The type of the computer tool call output. Always `computer_call_output`.","enum":["computer_call_output"],"type":"string","x-stainless-const":true}},"required":["call_id","type","output"],"title":"Computer tool call output","type":"object"},"ComputerCallSafetyCheckParam":{"description":"A pending safety check for the computer call.","properties":{"code":{"anyOf":[{"description":"The type of the pending safety check.","type":"string"},{"type":"null"}]},"id":{"description":"The ID of the pending safety check.","type":"string"},"message":{"anyOf":[{"description":"Details about the pending safety check.","type":"string"},{"type":"null"}]}},"required":["id"],"type":"object"},"ComputerScreenshotImage":{"additionalProperties":true,"description":"Opaque upstream schema placeholder for ComputerScreenshotImage; see overlay x-ohmygpt-opaque-upstream-schemas for rationale.","properties":{"type":{"type":"string"}},"required":["type"],"type":"object","x-ohmygpt-opaque":true,"x-ohmygpt-upstream-ref":"ComputerScreenshotImage"},"ComputerToolCall":{"description":"A tool call to a computer use tool. See the\n[computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information.\n","properties":{"action":{"$ref":"#/components/schemas/ComputerAction"},"call_id":{"description":"An identifier used when responding to the tool call with output.\n","type":"string"},"id":{"description":"The unique ID of the computer call.","type":"string"},"pending_safety_checks":{"description":"The pending safety checks for the computer call.\n","items":{"$ref":"#/components/schemas/ComputerCallSafetyCheckParam"},"type":"array"},"status":{"description":"The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n","enum":["in_progress","completed","incomplete"],"type":"string"},"type":{"default":"computer_call","description":"The type of the computer call. Always `computer_call`.","enum":["computer_call"],"type":"string"}},"required":["type","id","action","call_id","pending_safety_checks","status"],"title":"Computer tool call","type":"object"},"ComputerUse":{"description":"Computer Use tool type.","properties":{"disabledSafetyPolicies":{"description":"Optional. Disabled safety policies for computer use.","items":{"enum":["SAFETY_POLICY_UNSPECIFIED","FINANCIAL_TRANSACTIONS","SENSITIVE_DATA_MODIFICATION","COMMUNICATION_TOOL","ACCOUNT_CREATION","DATA_MODIFICATION","USER_CONSENT_MANAGEMENT","LEGAL_TERMS_AND_AGREEMENTS"],"type":"string"},"type":"array"},"enablePromptInjectionDetection":{"description":"Optional. Whether enable the prompt injection detection check on computer-use\nrequest.","type":"boolean"},"environment":{"description":"Required. The environment being operated.","enum":["ENVIRONMENT_UNSPECIFIED","ENVIRONMENT_BROWSER","ENVIRONMENT_MOBILE","ENVIRONMENT_DESKTOP"],"type":"string"},"excludedPredefinedFunctions":{"description":"Optional. By default, predefined functions are included in the final model\ncall.\nSome of them can be explicitly excluded from being automatically\nincluded. This can serve two purposes:\n1. Using a more restricted / different action space.\n2. Improving the definitions / instructions of predefined functions.","items":{"type":"string"},"type":"array"}},"required":["environment"],"type":"object"},"ComputerUsePreviewTool":{"additionalProperties":true,"description":"Opaque upstream schema placeholder for ComputerUsePreviewTool; see overlay x-ohmygpt-opaque-upstream-schemas for rationale.","properties":{"type":{"type":"string"}},"required":["type"],"type":"object","x-ohmygpt-opaque":true,"x-ohmygpt-upstream-ref":"ComputerUsePreviewTool"},"ContactAccepted":{"properties":{"status":{"enum":["accepted"],"type":"string"}},"required":["status"],"type":"object"},"ContactRequest":{"description":"What the message is about decides which fields it takes.","oneOf":[{"$ref":"#/components/schemas/EnterpriseContact"},{"$ref":"#/components/schemas/ModelRequestContact"}]},"Container":{"description":"Information about the container used in the request (for the code execution tool)","properties":{"expires_at":{"description":"The time at which the container will expire.","format":"date-time","title":"Expires At","type":"string"},"id":{"description":"Identifier for the container used in this request","title":"Id","type":"string"}},"required":["expires_at","id"],"title":"Container","type":"object"},"ContainerFileCitationBody":{"description":"A citation for a container file used to generate a model response.","properties":{"container_id":{"description":"The ID of the container file.","type":"string"},"end_index":{"description":"The index of the last character of the container file citation in the message.","type":"integer"},"file_id":{"description":"The ID of the file.","type":"string"},"filename":{"description":"The filename of the container file cited.","type":"string"},"start_index":{"description":"The index of the first character of the container file citation in the message.","type":"integer"},"type":{"default":"container_file_citation","description":"The type of the container file citation. Always `container_file_citation`.","enum":["container_file_citation"],"type":"string","x-stainless-const":true}},"required":["type","container_id","file_id","start_index","end_index","filename"],"title":"Container file citation","type":"object"},"ContainerReferenceParam":{"additionalProperties":true,"description":"Opaque upstream schema placeholder for ContainerReferenceParam; see overlay x-ohmygpt-opaque-upstream-schemas for rationale.","properties":{"type":{"type":"string"}},"required":["type"],"type":"object","x-ohmygpt-opaque":true,"x-ohmygpt-upstream-ref":"ContainerReferenceParam"},"ContainerReferenceResource":{"description":"Represents a container created with /v1/containers.","properties":{"container_id":{"type":"string"},"type":{"default":"container_reference","description":"The environment type. Always `container_reference`.","enum":["container_reference"],"type":"string","x-stainless-const":true}},"required":["type","container_id"],"title":"Container Reference","type":"object"},"Content":{"description":"The base structured datatype containing multi-part content of a message.\n\nA `Content` includes a `role` field designating the producer of the `Content`\nand a `parts` field containing multi-part data that contains the content of\nthe message turn.","properties":{"parts":{"description":"Ordered `Parts` that constitute a single message. Parts may have different\nMIME types.","items":{"$ref":"#/components/schemas/Part"},"type":"array"},"role":{"description":"Optional. The producer of the content. Must be either 'user' or 'model'.\n\nUseful to set for multi-turn conversations, otherwise can be left blank\nor unset.","type":"string"}},"type":"object"},"ContentBlock":{"discriminator":{"mapping":{"bash_code_execution_tool_result":"#/components/schemas/ResponseBashCodeExecutionToolResultBlock","code_execution_tool_result":"#/components/schemas/ResponseCodeExecutionToolResultBlock","container_upload":"#/components/schemas/ResponseContainerUploadBlock","redacted_thinking":"#/components/schemas/ResponseRedactedThinkingBlock","server_tool_use":"#/components/schemas/ResponseServerToolUseBlock","text":"#/components/schemas/ResponseTextBlock","text_editor_code_execution_tool_result":"#/components/schemas/ResponseTextEditorCodeExecutionToolResultBlock","thinking":"#/components/schemas/ResponseThinkingBlock","tool_search_tool_result":"#/components/schemas/ResponseToolSearchToolResultBlock","tool_use":"#/components/schemas/ResponseToolUseBlock","web_fetch_tool_result":"#/components/schemas/ResponseWebFetchToolResultBlock","web_search_tool_result":"#/components/schemas/ResponseWebSearchToolResultBlock"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/ResponseTextBlock"},{"$ref":"#/components/schemas/ResponseThinkingBlock"},{"$ref":"#/components/schemas/ResponseRedactedThinkingBlock"},{"$ref":"#/components/schemas/ResponseToolUseBlock"},{"$ref":"#/components/schemas/ResponseServerToolUseBlock"},{"$ref":"#/components/schemas/ResponseWebSearchToolResultBlock"},{"$ref":"#/components/schemas/ResponseWebFetchToolResultBlock"},{"$ref":"#/components/schemas/ResponseCodeExecutionToolResultBlock"},{"$ref":"#/components/schemas/ResponseBashCodeExecutionToolResultBlock"},{"$ref":"#/components/schemas/ResponseTextEditorCodeExecutionToolResultBlock"},{"$ref":"#/components/schemas/ResponseToolSearchToolResultBlock"},{"$ref":"#/components/schemas/ResponseContainerUploadBlock"}]},"ContextManagementParam":{"properties":{"compact_threshold":{"anyOf":[{"description":"Token threshold at which compaction should be triggered for this entry.","minimum":1000,"type":"integer"},{"type":"null"}]},"type":{"description":"The context management entry type. Currently only 'compaction' is supported.","type":"string"}},"required":["type"],"type":"object"},"Conversation-2":{"additionalProperties":true,"description":"Opaque upstream schema placeholder for Conversation-2; see overlay x-ohmygpt-opaque-upstream-schemas for rationale.","properties":{"type":{"type":"string"}},"required":["type"],"type":"object","x-ohmygpt-opaque":true,"x-ohmygpt-upstream-ref":"Conversation-2"},"ConversationParam":{"default":null,"description":"The conversation that this response belongs to. Items from this conversation are prepended to `input_items` for this response request.\nInput items and output items from this response are automatically added to this conversation after this response completes.\n","oneOf":[{"description":"The unique ID of the conversation.\n","title":"Conversation ID","type":"string"},{"$ref":"#/components/schemas/ConversationParam-2"}]},"ConversationParam-2":{"additionalProperties":true,"description":"Opaque upstream schema placeholder for ConversationParam-2; see overlay x-ohmygpt-opaque-upstream-schemas for rationale.","properties":{"type":{"type":"string"}},"required":["type"],"type":"object","x-ohmygpt-opaque":true,"x-ohmygpt-upstream-ref":"ConversationParam-2"},"CostEstimateRequest":{"additionalProperties":true,"description":"The body you would send to the model's endpoint; fields the estimate does not read are ignored.","properties":{"input":{"description":"Text to speech models, the text to read aloud.","type":"string"},"max_completion_tokens":{"type":"integer"},"max_tokens":{"type":"integer"},"media":{"description":"Video models.","items":{"$ref":"#/components/schemas/VideoMedia"},"type":"array"},"messages":{"description":"Chat models.","items":{},"type":"array"},"model":{"type":"string"},"prompt":{"description":"Video models; required, as in `POST /v1/videos`.","type":"string"},"seconds":{"description":"Video models.","type":"integer"},"size":{"description":"Video models.","type":"string"}},"required":["model"],"type":"object"},"CostEstimateResult":{"properties":{"confidence":{"description":"`exact` is what the request is charged (for video, the price the job freezes); `upper_bound` is the most it can cost.","enum":["exact","upper_bound"],"type":"string"},"credits":{"description":"The estimate in Credits, the number in `max_total_cost`.","type":"integer"},"estimated_input_cost":{"type":"string"},"estimated_input_tokens":{"type":"integer"},"max_output_cost":{"type":"string"},"max_output_tokens":{"type":"integer"},"max_total_cost":{"type":"string"},"model":{"type":"string"}},"required":["model","estimated_input_cost","max_output_cost","max_total_cost","credits","confidence"],"type":"object"},"CreateChatCompletionRequest":{"allOf":[{"$ref":"#/components/schemas/CreateModelResponseProperties"},{"properties":{"audio":{"description":"Parameters for audio output. Required when audio output is requested with\n`modalities: [\"audio\"]`. [Learn more](https://platform.openai.com/docs/guides/audio).\n","nullable":true,"properties":{"format":{"description":"Specifies the output audio format. Must be one of `wav`, `mp3`, `flac`,\n`opus`, or `pcm16`.\n","enum":["wav","aac","mp3","flac","opus","pcm16"],"type":"string"},"voice":{"$ref":"#/components/schemas/VoiceIdsOrCustomVoice","description":"The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `nova`, `onyx`,\n`sage`, `shimmer`, `marin`, and `cedar`. You may also provide a\ncustom voice object with an `id`, for example `{ \"id\": \"voice_1234\" }`.\n"}},"required":["voice","format"],"type":"object"},"frequency_penalty":{"default":0,"description":"Number between -2.0 and 2.0. Positive values penalize new tokens based on\ntheir existing frequency in the text so far, decreasing the model's\nlikelihood to repeat the same line verbatim.\n","maximum":2,"minimum":-2,"nullable":true,"type":"number"},"function_call":{"deprecated":true,"description":"Deprecated in favor of `tool_choice`.\n\nControls which (if any) function is called by the model.\n\n`none` means the model will not call a function and instead generates a\nmessage.\n\n`auto` means the model can pick between generating a message or calling a\nfunction.\n\nSpecifying a particular function via `{\"name\": \"my_function\"}` forces the\nmodel to call that function.\n\n`none` is the default when no functions are present. `auto` is the default\nif functions are present.\n","oneOf":[{"description":"`none` means the model will not call a function and instead generates a message. `auto` means the model can pick between generating a message or calling a function.\n","enum":["none","auto"],"type":"string"},{"$ref":"#/components/schemas/ChatCompletionFunctionCallOption"}]},"functions":{"deprecated":true,"description":"Deprecated in favor of `tools`.\n\nA list of functions the model may generate JSON inputs for.\n","items":{"$ref":"#/components/schemas/ChatCompletionFunctions"},"maxItems":128,"minItems":1,"type":"array"},"logit_bias":{"additionalProperties":{"type":"integer"},"default":null,"description":"Modify the likelihood of specified tokens appearing in the completion.\n\nAccepts a JSON object that maps tokens (specified by their token ID in the\ntokenizer) to an associated bias value from -100 to 100. Mathematically,\nthe bias is added to the logits generated by the model prior to sampling.\nThe exact effect will vary per model, but values between -1 and 1 should\ndecrease or increase likelihood of selection; values like -100 or 100\nshould result in a ban or exclusive selection of the relevant token.\n","nullable":true,"type":"object","x-oaiTypeLabel":"map"},"logprobs":{"default":false,"description":"Whether to return log probabilities of the output tokens or not. If true,\nreturns the log probabilities of each output token returned in the\n`content` of `message`.\n","nullable":true,"type":"boolean"},"max_completion_tokens":{"description":"An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and [reasoning tokens](https://platform.openai.com/docs/guides/reasoning).\n","nullable":true,"type":"integer"},"max_tokens":{"deprecated":true,"description":"The maximum number of [tokens](https://platform.openai.com/tokenizer) that can be generated in the\nchat completion. This value controls the maximum generated tokens.\n\nThis value is now deprecated in favor of `max_completion_tokens`, and is\nnot compatible with [o-series models](https://platform.openai.com/docs/guides/reasoning).\n","nullable":true,"type":"integer"},"messages":{"description":"A list of messages comprising the conversation so far. Depending on the\n[model](https://platform.openai.com/docs/models) you use, different message types (modalities) are\nsupported, like [text](https://platform.openai.com/docs/guides/text-generation),\n[images](https://platform.openai.com/docs/guides/vision), and [audio](https://platform.openai.com/docs/guides/audio).\n","items":{"$ref":"#/components/schemas/ChatCompletionRequestMessage"},"minItems":1,"type":"array"},"modalities":{"$ref":"#/components/schemas/ResponseModalities"},"model":{"$ref":"#/components/schemas/ModelIdsShared","description":"Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI\noffers a wide range of models with different capabilities, performance\ncharacteristics, and latency profiles. Refer to the [model guide](https://platform.openai.com/docs/models)\nto browse and compare available models.\n"},"n":{"default":1,"description":"How many chat completion choices to generate for each input message. Higher values can generate more output tokens.","example":1,"maximum":128,"minimum":1,"nullable":true,"type":"integer"},"parallel_tool_calls":{"$ref":"#/components/schemas/ParallelToolCalls"},"prediction":{"description":"Configuration for a [Predicted Output](https://platform.openai.com/docs/guides/predicted-outputs),\nwhich can greatly improve response times when large parts of the model\nresponse are known ahead of time. This is most common when you are\nregenerating a file with only minor changes to most of the content.\n","nullable":true,"oneOf":[{"$ref":"#/components/schemas/PredictionContent"}]},"presence_penalty":{"default":0,"description":"Number between -2.0 and 2.0. Positive values penalize new tokens based on\nwhether they appear in the text so far, increasing the model's likelihood\nto talk about new topics.\n","maximum":2,"minimum":-2,"nullable":true,"type":"number"},"reasoning_effort":{"$ref":"#/components/schemas/ReasoningEffort"},"response_format":{"description":"An object specifying the format that the model must output.\n\nSetting to `{ \"type\": \"json_schema\", \"json_schema\": {...} }` enables\nStructured Outputs which ensures the model will match your supplied JSON\nschema. Learn more in the [Structured Outputs\nguide](https://platform.openai.com/docs/guides/structured-outputs).\n\nSetting to `{ \"type\": \"json_object\" }` enables the older JSON mode, which\nensures the message the model generates is valid JSON. Using `json_schema`\nis preferred for models that support it.\n","discriminator":{"mapping":{"json_object":"#/components/schemas/ResponseFormatJsonObject","json_schema":"#/components/schemas/ResponseFormatJsonSchema","text":"#/components/schemas/ResponseFormatText"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/ResponseFormatText"},{"$ref":"#/components/schemas/ResponseFormatJsonSchema"},{"$ref":"#/components/schemas/ResponseFormatJsonObject"}]},"seed":{"deprecated":true,"description":"This feature is in Beta.\nIf specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return the same result.\nDeterminism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend.\n","maximum":9223372036854776000,"minimum":-9223372036854776000,"nullable":true,"type":"integer","x-oaiMeta":{"beta":true}},"stop":{"$ref":"#/components/schemas/StopConfiguration"},"store":{"default":false,"description":"Whether or not to store the output of this chat completion request for\nuse in our [model distillation](https://platform.openai.com/docs/guides/distillation) or\n[evals](https://platform.openai.com/docs/guides/evals) products.\n\nSupports text and image inputs. Note: image inputs over 8MB will be dropped.\n","nullable":true,"type":"boolean"},"stream":{"default":false,"description":"If set to true, the model response data will be streamed to the client\nas it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).\nSee the [Streaming section below](https://platform.openai.com/docs/api-reference/chat/streaming)\nfor more information, along with the [streaming responses](https://platform.openai.com/docs/guides/streaming-responses)\nguide for more information on how to handle the streaming events.\n","nullable":true,"type":"boolean"},"stream_options":{"$ref":"#/components/schemas/ChatCompletionStreamOptions"},"tool_choice":{"$ref":"#/components/schemas/ChatCompletionToolChoiceOption"},"tools":{"description":"A list of tools the model may call. You can provide either\n[custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) or\n[function tools](https://platform.openai.com/docs/guides/function-calling).\n","items":{"oneOf":[{"$ref":"#/components/schemas/ChatCompletionTool"},{"$ref":"#/components/schemas/CustomToolChatCompletions"}]},"type":"array"},"top_logprobs":{"description":"An integer between 0 and 20 specifying the number of most likely tokens to\nreturn at each token position, each with an associated log probability.\n`logprobs` must be set to `true` if this parameter is used.\n","maximum":20,"minimum":0,"nullable":true,"type":"integer"},"verbosity":{"$ref":"#/components/schemas/Verbosity"},"web_search_options":{"description":"This tool searches the web for relevant results to use in a response.\nLearn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search?api-mode=chat).\n","properties":{"search_context_size":{"$ref":"#/components/schemas/WebSearchContextSize"},"user_location":{"description":"Approximate location parameters for the search.\n","nullable":true,"properties":{"approximate":{"$ref":"#/components/schemas/WebSearchLocation"},"type":{"description":"The type of location approximation. Always `approximate`.\n","enum":["approximate"],"type":"string","x-stainless-const":true}},"required":["type","approximate"],"type":"object"}},"title":"Web search","type":"object"}},"required":["model","messages"],"type":"object"}]},"CreateChatCompletionResponse":{"description":"Represents a chat completion response returned by model, based on the provided input.","properties":{"choices":{"description":"A list of chat completion choices. Can be more than one if `n` is greater than 1.","items":{"properties":{"finish_reason":{"description":"The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence,\n`length` if the maximum number of tokens specified in the request was reached,\n`content_filter` if content was omitted due to a flag from our content filters,\n`tool_calls` if the model called a tool, or `function_call` (deprecated) if the model called a function.\n","enum":["stop","length","tool_calls","content_filter","function_call"],"type":"string"},"index":{"description":"The index of the choice in the list of choices.","type":"integer"},"logprobs":{"anyOf":[{"description":"Log probability information for the choice.","properties":{"content":{"anyOf":[{"description":"A list of message content tokens with log probability information.","items":{"$ref":"#/components/schemas/ChatCompletionTokenLogprob"},"type":"array"},{"type":"null"}]},"refusal":{"anyOf":[{"description":"A list of message refusal tokens with log probability information.","items":{"$ref":"#/components/schemas/ChatCompletionTokenLogprob"},"type":"array"},{"type":"null"}]}},"required":["content","refusal"],"type":"object"},{"type":"null"}]},"message":{"$ref":"#/components/schemas/ChatCompletionResponseMessage"}},"required":["finish_reason","index","message","logprobs"],"type":"object"},"type":"array"},"created":{"description":"The Unix timestamp (in seconds) of when the chat completion was created.","type":"integer"},"id":{"description":"A unique identifier for the chat completion.","type":"string"},"model":{"description":"The model used for the chat completion.","type":"string"},"object":{"description":"The object type, which is always `chat.completion`.","enum":["chat.completion"],"type":"string","x-stainless-const":true},"service_tier":{"$ref":"#/components/schemas/ServiceTier"},"system_fingerprint":{"deprecated":true,"description":"This fingerprint represents the backend configuration that the model runs with.\n\nCan be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.\n","type":"string"},"usage":{"$ref":"#/components/schemas/CompletionUsage"}},"required":["choices","created","id","model","object"],"type":"object","x-oaiMeta":{"example":"{\n  \"id\": \"chatcmpl-B9MHDbslfkBeAs8l4bebGdFOJ6PeG\",\n  \"object\": \"chat.completion\",\n  \"created\": 1741570283,\n  \"model\": \"gpt-4o-2024-08-06\",\n  \"choices\": [\n    {\n      \"index\": 0,\n      \"message\": {\n        \"role\": \"assistant\",\n        \"content\": \"The image shows a wooden boardwalk path running through a lush green field or meadow. The sky is bright blue with some scattered clouds, giving the scene a serene and peaceful atmosphere. Trees and shrubs are visible in the background.\",\n        \"refusal\": null,\n        \"annotations\": []\n      },\n      \"logprobs\": null,\n      \"finish_reason\": \"stop\"\n    }\n  ],\n  \"usage\": {\n    \"prompt_tokens\": 1117,\n    \"completion_tokens\": 46,\n    \"total_tokens\": 1163,\n    \"prompt_tokens_details\": {\n      \"cached_tokens\": 0,\n      \"audio_tokens\": 0\n    },\n    \"completion_tokens_details\": {\n      \"reasoning_tokens\": 0,\n      \"audio_tokens\": 0,\n      \"accepted_prediction_tokens\": 0,\n      \"rejected_prediction_tokens\": 0\n    }\n  },\n  \"service_tier\": \"default\",\n  \"system_fingerprint\": \"fp_fc9f1d7035\"\n}\n","group":"chat","name":"The chat completion object"}},"CreateChatCompletionStreamResponse":{"description":"Represents a streamed chunk of a chat completion response returned\nby the model, based on the provided input. \n[Learn more](https://platform.openai.com/docs/guides/streaming-responses).\n","properties":{"choices":{"description":"A list of chat completion choices. Can contain more than one elements if `n` is greater than 1. Can also be empty for the\nlast chunk if you set `stream_options: {\"include_usage\": true}`.\n","items":{"properties":{"delta":{"$ref":"#/components/schemas/ChatCompletionStreamResponseDelta"},"finish_reason":{"description":"The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence,\n`length` if the maximum number of tokens specified in the request was reached,\n`content_filter` if content was omitted due to a flag from our content filters,\n`tool_calls` if the model called a tool, or `function_call` (deprecated) if the model called a function.\n","enum":["stop","length","tool_calls","content_filter","function_call"],"nullable":true,"type":"string"},"index":{"description":"The index of the choice in the list of choices.","type":"integer"},"logprobs":{"description":"Log probability information for the choice.","nullable":true,"properties":{"content":{"description":"A list of message content tokens with log probability information.","items":{"$ref":"#/components/schemas/ChatCompletionTokenLogprob"},"nullable":true,"type":"array"},"refusal":{"description":"A list of message refusal tokens with log probability information.","items":{"$ref":"#/components/schemas/ChatCompletionTokenLogprob"},"nullable":true,"type":"array"}},"required":["content","refusal"],"type":"object"}},"required":["delta","finish_reason","index"],"type":"object"},"type":"array"},"created":{"description":"The Unix timestamp (in seconds) of when the chat completion was created. Each chunk has the same timestamp.","type":"integer"},"id":{"description":"A unique identifier for the chat completion. Each chunk has the same ID.","type":"string"},"model":{"description":"The model to generate the completion.","type":"string"},"object":{"description":"The object type, which is always `chat.completion.chunk`.","enum":["chat.completion.chunk"],"type":"string","x-stainless-const":true},"service_tier":{"$ref":"#/components/schemas/ServiceTier"},"system_fingerprint":{"deprecated":true,"description":"This fingerprint represents the backend configuration that the model runs with.\nCan be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.\n","type":"string"},"usage":{"$ref":"#/components/schemas/CompletionUsage","description":"An optional field that will only be present when you set\n`stream_options: {\"include_usage\": true}` in your request. When present, it\ncontains a null value **except for the last chunk** which contains the\ntoken usage statistics for the entire request.\n\n**NOTE:** If the stream is interrupted or cancelled, you may not\nreceive the final usage chunk which contains the total token usage for\nthe request.\n","nullable":true}},"required":["choices","created","id","model","object"],"type":"object","x-oaiMeta":{"example":"{\"id\":\"chatcmpl-123\",\"object\":\"chat.completion.chunk\",\"created\":1694268190,\"model\":\"gpt-4o-mini\", \"system_fingerprint\": \"fp_44709d6fcb\", \"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\"},\"logprobs\":null,\"finish_reason\":null}]}\n\n{\"id\":\"chatcmpl-123\",\"object\":\"chat.completion.chunk\",\"created\":1694268190,\"model\":\"gpt-4o-mini\", \"system_fingerprint\": \"fp_44709d6fcb\", \"choices\":[{\"index\":0,\"delta\":{\"content\":\"Hello\"},\"logprobs\":null,\"finish_reason\":null}]}\n\n....\n\n{\"id\":\"chatcmpl-123\",\"object\":\"chat.completion.chunk\",\"created\":1694268190,\"model\":\"gpt-4o-mini\", \"system_fingerprint\": \"fp_44709d6fcb\", \"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}]}\n","group":"chat","name":"The chat completion chunk object"}},"CreateEmbeddingRequest":{"additionalProperties":false,"properties":{"dimensions":{"description":"The number of dimensions the resulting output embeddings should have. Only supported in `text-embedding-3` and later models.\n","minimum":1,"type":"integer"},"encoding_format":{"default":"float","description":"The format to return the embeddings in. Can be either `float` or [`base64`](https://pypi.org/project/pybase64/).","enum":["float","base64"],"example":"float","type":"string"},"input":{"description":"Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single request, pass an array of strings or array of token arrays. The input must not exceed the max input tokens for the model (8192 tokens for all embedding models), cannot be an empty string, and any array must be 2048 dimensions or less. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens. In addition to the per-input token limit, all embedding  models enforce a maximum of 300,000 tokens summed across all inputs in a  single request.\n","example":"The quick brown fox jumped over the lazy dog","oneOf":[{"default":"","description":"The string that will be turned into an embedding.","example":"This is a test.","title":"string","type":"string"},{"description":"The array of strings that will be turned into an embedding.","items":{"default":"","example":"['This is a test.']","type":"string"},"maxItems":2048,"minItems":1,"title":"array","type":"array"},{"description":"The array of integers that will be turned into an embedding.","example":"[1212, 318, 257, 1332, 13]","items":{"type":"integer"},"maxItems":2048,"minItems":1,"title":"array","type":"array"},{"description":"The array of arrays containing integers that will be turned into an embedding.","example":"[[1212, 318, 257, 1332, 13]]","items":{"items":{"type":"integer"},"minItems":1,"type":"array"},"maxItems":2048,"minItems":1,"title":"array","type":"array"}]},"model":{"anyOf":[{"type":"string"},{"enum":["text-embedding-ada-002","text-embedding-3-small","text-embedding-3-large"],"type":"string"}],"description":"ID of the model to use. You can use the [List models](https://platform.openai.com/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](https://platform.openai.com/docs/models) for descriptions of them.\n","example":"text-embedding-3-small","x-oaiTypeLabel":"string"},"user":{"description":"A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids).\n","example":"user-1234","type":"string"}},"required":["model","input"],"type":"object"},"CreateEmbeddingResponse":{"properties":{"data":{"description":"The list of embeddings generated by the model.","items":{"$ref":"#/components/schemas/Embedding"},"type":"array"},"model":{"description":"The name of the model used to generate the embedding.","type":"string"},"object":{"description":"The object type, which is always \"list\".","enum":["list"],"type":"string","x-stainless-const":true},"usage":{"description":"The usage information for the request.","properties":{"prompt_tokens":{"description":"The number of tokens used by the prompt.","type":"integer"},"total_tokens":{"description":"The total number of tokens used by the request.","type":"integer"}},"required":["prompt_tokens","total_tokens"],"type":"object"}},"required":["object","model","data","usage"],"type":"object"},"CreateImageRequest":{"properties":{"background":{"anyOf":[{"enum":["transparent","opaque","auto"],"type":"string"},{"type":"null"}],"default":"auto","description":"Set the background of the generated image(s). This parameter is only supported for\nthe GPT image models. Must be one of `transparent`, `opaque`, or `auto` (default\nvalue). When `auto` is used, the model will automatically determine the best\nbackground for the image.\n\n`gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their `2026-09-08`\nsnapshots, support `opaque` and `transparent` backgrounds. Transparent backgrounds\nare available for supported GPT Image models. For `gpt-image-2` and\n`gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`,\nset the output format to `png` or `webp`.\n","example":"transparent"},"complexity":{"$ref":"#/components/schemas/complexity"},"frame_count":{"$ref":"#/components/schemas/frame_count"},"frame_duration_ms":{"$ref":"#/components/schemas/frame_duration_ms"},"model":{"anyOf":[{"type":"string"},{"enum":["gpt-image-1.5","gpt-image-2","gpt-image-2-2026-04-21","gpt-image-2.5-sunburst","gpt-image-2.5-sunburst-2026-09-08","gpt-image-2.5-flare","gpt-image-2.5-flare-2026-09-08","gpt-image-2.6-sunburst","gpt-image-2.6-flare","gpt-image-1","gpt-image-1-mini","chatgpt-image-latest","dall-e-2","dall-e-3"],"type":"string","x-openai-enum-deprecations":{"dall-e-2":{"message":"This model was retired on May 12, 2026. Use a GPT image model instead."},"dall-e-3":{"message":"This model was retired on May 12, 2026. Use a GPT image model instead."},"gpt-image-1":{"message":"GPT Image 1 was shut down on October 23, 2026. Use gpt-image-2.5-sunburst or gpt-image-2.5-flare instead."}}}],"description":"The GPT image model to use for image generation. Specify a model explicitly.\nSupported models include `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,\n`gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,\n`gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,\n`gpt-image-2.5-flare-2026-09-08`, `gpt-image-2.6-sunburst`, `gpt-image-2.6-flare`,\nand `chatgpt-image-latest`.\n\n`gpt-image-1` was shut down on October 23, 2026. Use\n`gpt-image-2.5-sunburst` or `gpt-image-2.5-flare` instead.\n","example":"gpt-image-2.5-flare","x-oaiTypeLabel":"string"},"moderation":{"anyOf":[{"enum":["low","auto"],"type":"string"},{"type":"null"}],"default":"auto","description":"Control the content-moderation level for images generated by the GPT image models. Must be either `low` for less restrictive filtering or `auto` (default value).","example":"low"},"n":{"default":1,"description":"The number of images to generate. Must be between 1 and 10.","example":1,"maximum":10,"minimum":1,"type":["integer","null"]},"output_compression":{"default":100,"description":"The compression level (0-100%) for the generated images. This parameter is only supported for the GPT image models with the `webp` or `jpeg` output formats, and defaults to 100.","example":100,"type":["integer","null"]},"output_format":{"anyOf":[{"enum":["png","jpeg","webp","gif","svg"],"type":"string"},{"type":"null"}],"default":"png","description":"The format in which the generated images are returned. This parameter is only supported for the GPT image models.","example":"png"},"partial_images":{"$ref":"#/components/schemas/PartialImages"},"prompt":{"description":"A text description of the desired image(s). The maximum length is 32000 characters.","example":"A cute baby sea otter","type":"string"},"quality":{"anyOf":[{"enum":["low","medium","high","xhigh","max","auto","standard","hd"],"type":"string","x-openai-enum-deprecations":{"hd":{"message":"This quality was only supported by retired DALL·E models. Use a GPT image quality instead."},"standard":{"message":"This quality was only supported by retired DALL·E models. Use a GPT image quality instead."}}},{"type":"null"}],"default":"auto","description":"The quality of the image that will be generated.\n\n- `auto` (default value) will automatically select the best quality for the given\n  model.\n- `high`, `medium` and `low` are supported for the GPT image models.\n- `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their `2026-09-08`\n  snapshots, also support `xhigh` and `max`.\n","example":"medium"},"response_format":{"deprecated":true,"description":"Legacy response format parameter for retired image models. Unsupported for GPT image models, which always return base64-encoded images.","enum":["url","b64_json",null],"type":["string","null"]},"safety_identifier":{"description":"A stable identifier for an end user in your organization, used for safety monitoring and abuse detection. Hash a username or email address to avoid sending identifying information. A non-empty value takes precedence over the deprecated `user` parameter. If omitted, null, or empty, the API uses `user` when available. [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).","example":"user-1234","maxLength":128,"type":["string","null"]},"size":{"anyOf":[{"type":"string"},{"enum":["auto","1024x1024","1536x1024","1024x1536","256x256","512x512","1792x1024","1024x1792"],"type":"string","x-openai-enum-deprecations":{"1024x1792":{"message":"This legacy size suggestion is retained for SDK compatibility. Check the selected GPT image model's supported sizes."},"1792x1024":{"message":"This legacy size suggestion is retained for SDK compatibility. Check the selected GPT image model's supported sizes."},"256x256":{"message":"This legacy size suggestion is retained for SDK compatibility. Check the selected GPT image model's supported sizes."},"512x512":{"message":"This legacy size suggestion is retained for SDK compatibility. Check the selected GPT image model's supported sizes."}}},{"type":"null"}],"default":"auto","description":"The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing.","example":"1024x1024"},"stream":{"default":false,"description":"Generate the image in streaming mode. Defaults to `false`. See the\n[Image generation guide](https://developers.openai.com/api/docs/guides/image-generation) for more information.\nThis parameter is only supported for the GPT image models.\n","example":false,"type":["boolean","null"]},"style":{"deprecated":true,"description":"Legacy style parameter for retired image models. Unsupported for GPT image models; describe the desired style in the prompt instead.","enum":["vivid","natural",null],"example":"vivid","type":["string","null"]},"svg":{"$ref":"#/components/schemas/svg"},"user":{"deprecated":true,"description":"Deprecated: use `safety_identifier` instead. This parameter remains accepted for backward compatibility and is used when `safety_identifier` is omitted, null, or empty. [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).","example":"user-1234","type":"string"}},"required":["model","prompt"],"type":"object"},"CreateModelResponseProperties":{"allOf":[{"$ref":"#/components/schemas/ModelResponseProperties"},{"properties":{"top_logprobs":{"description":"An integer between 0 and 20 specifying the number of most likely tokens to\nreturn at each token position, each with an associated log probability.\n","maximum":20,"minimum":0,"type":"integer"}},"type":"object"}]},"CreateModerationRequest":{"properties":{"input":{"description":"Input (or inputs) to classify. Can be a single string, an array of strings, or\nan array of multi-modal input objects similar to other models.\n","oneOf":[{"default":"","description":"A string of text to classify for moderation.","example":"I want to kill them.","type":"string"},{"description":"An array of strings to classify for moderation.","items":{"default":"","example":"I want to kill them.","type":"string"},"type":"array"},{"description":"An array of multi-modal inputs to the moderation model.","items":{"oneOf":[{"description":"An object describing an image to classify.","properties":{"image_url":{"description":"Contains either an image URL or a data URL for a base64 encoded image.","properties":{"url":{"description":"Either a URL of the image or the base64 encoded image data.","example":"https://example.com/image.jpg","format":"uri","type":"string"}},"required":["url"],"type":"object"},"type":{"description":"Always `image_url`.","enum":["image_url"],"type":"string","x-stainless-const":true}},"required":["type","image_url"],"type":"object"},{"description":"An object describing text to classify.","properties":{"text":{"description":"A string of text to classify.","example":"I want to kill them","type":"string"},"type":{"description":"Always `text`.","enum":["text"],"type":"string","x-stainless-const":true}},"required":["type","text"],"type":"object"}]},"type":"array"}]},"model":{"anyOf":[{"type":"string"},{"enum":["omni-moderation-latest","omni-moderation-2024-09-26","text-moderation-latest","text-moderation-stable"],"type":"string"}],"default":"omni-moderation-latest","description":"The content moderation model you would like to use. Learn more in\n[the moderation guide](https://platform.openai.com/docs/guides/moderation), and learn about\navailable models [here](https://platform.openai.com/docs/models#moderation).\n","example":"omni-moderation-2024-09-26","nullable":false,"x-oaiTypeLabel":"string"}},"required":["input"],"type":"object"},"CreateModerationResponse":{"description":"Represents if a given text input is potentially harmful.","properties":{"id":{"description":"The unique identifier for the moderation request.","type":"string"},"model":{"description":"The model used to generate the moderation results.","type":"string"},"results":{"description":"A list of moderation objects.","items":{"properties":{"categories":{"description":"A list of the categories, and whether they are flagged or not.","properties":{"harassment":{"description":"Content that expresses, incites, or promotes harassing language towards any target.","type":"boolean"},"harassment/threatening":{"description":"Harassment content that also includes violence or serious harm towards any target.","type":"boolean"},"hate":{"description":"Content that expresses, incites, or promotes hate based on race, gender, ethnicity, religion, nationality, sexual orientation, disability status, or caste. Hateful content aimed at non-protected groups (e.g., chess players) is harassment.","type":"boolean"},"hate/threatening":{"description":"Hateful content that also includes violence or serious harm towards the targeted group based on race, gender, ethnicity, religion, nationality, sexual orientation, disability status, or caste.","type":"boolean"},"illicit":{"description":"Content that includes instructions or advice that facilitate the planning or execution of wrongdoing, or that gives advice or instruction on how to commit illicit acts. For example, \"how to shoplift\" would fit this category.","nullable":true,"type":"boolean"},"illicit/violent":{"description":"Content that includes instructions or advice that facilitate the planning or execution of wrongdoing that also includes violence, or that gives advice or instruction on the procurement of any weapon.","nullable":true,"type":"boolean"},"self-harm":{"description":"Content that promotes, encourages, or depicts acts of self-harm, such as suicide, cutting, and eating disorders.","type":"boolean"},"self-harm/instructions":{"description":"Content that encourages performing acts of self-harm, such as suicide, cutting, and eating disorders, or that gives instructions or advice on how to commit such acts.","type":"boolean"},"self-harm/intent":{"description":"Content where the speaker expresses that they are engaging or intend to engage in acts of self-harm, such as suicide, cutting, and eating disorders.","type":"boolean"},"sexual":{"description":"Content meant to arouse sexual excitement, such as the description of sexual activity, or that promotes sexual services (excluding sex education and wellness).","type":"boolean"},"sexual/minors":{"description":"Sexual content that includes an individual who is under 18 years old.","type":"boolean"},"violence":{"description":"Content that depicts death, violence, or physical injury.","type":"boolean"},"violence/graphic":{"description":"Content that depicts death, violence, or physical injury in graphic detail.","type":"boolean"}},"required":["hate","hate/threatening","harassment","harassment/threatening","illicit","illicit/violent","self-harm","self-harm/intent","self-harm/instructions","sexual","sexual/minors","violence","violence/graphic"],"type":"object"},"category_applied_input_types":{"description":"A list of the categories along with the input type(s) that the score applies to.","properties":{"harassment":{"description":"The applied input type(s) for the category 'harassment'.","items":{"enum":["text"],"type":"string","x-stainless-const":true},"type":"array"},"harassment/threatening":{"description":"The applied input type(s) for the category 'harassment/threatening'.","items":{"enum":["text"],"type":"string","x-stainless-const":true},"type":"array"},"hate":{"description":"The applied input type(s) for the category 'hate'.","items":{"enum":["text"],"type":"string","x-stainless-const":true},"type":"array"},"hate/threatening":{"description":"The applied input type(s) for the category 'hate/threatening'.","items":{"enum":["text"],"type":"string","x-stainless-const":true},"type":"array"},"illicit":{"description":"The applied input type(s) for the category 'illicit'.","items":{"enum":["text"],"type":"string","x-stainless-const":true},"type":"array"},"illicit/violent":{"description":"The applied input type(s) for the category 'illicit/violent'.","items":{"enum":["text"],"type":"string","x-stainless-const":true},"type":"array"},"self-harm":{"description":"The applied input type(s) for the category 'self-harm'.","items":{"enum":["text","image"],"type":"string"},"type":"array"},"self-harm/instructions":{"description":"The applied input type(s) for the category 'self-harm/instructions'.","items":{"enum":["text","image"],"type":"string"},"type":"array"},"self-harm/intent":{"description":"The applied input type(s) for the category 'self-harm/intent'.","items":{"enum":["text","image"],"type":"string"},"type":"array"},"sexual":{"description":"The applied input type(s) for the category 'sexual'.","items":{"enum":["text","image"],"type":"string"},"type":"array"},"sexual/minors":{"description":"The applied input type(s) for the category 'sexual/minors'.","items":{"enum":["text"],"type":"string","x-stainless-const":true},"type":"array"},"violence":{"description":"The applied input type(s) for the category 'violence'.","items":{"enum":["text","image"],"type":"string"},"type":"array"},"violence/graphic":{"description":"The applied input type(s) for the category 'violence/graphic'.","items":{"enum":["text","image"],"type":"string"},"type":"array"}},"required":["hate","hate/threatening","harassment","harassment/threatening","illicit","illicit/violent","self-harm","self-harm/intent","self-harm/instructions","sexual","sexual/minors","violence","violence/graphic"],"type":"object"},"category_scores":{"description":"A list of the categories along with their scores as predicted by model.","properties":{"harassment":{"description":"The score for the category 'harassment'.","type":"number"},"harassment/threatening":{"description":"The score for the category 'harassment/threatening'.","type":"number"},"hate":{"description":"The score for the category 'hate'.","type":"number"},"hate/threatening":{"description":"The score for the category 'hate/threatening'.","type":"number"},"illicit":{"description":"The score for the category 'illicit'.","type":"number"},"illicit/violent":{"description":"The score for the category 'illicit/violent'.","type":"number"},"self-harm":{"description":"The score for the category 'self-harm'.","type":"number"},"self-harm/instructions":{"description":"The score for the category 'self-harm/instructions'.","type":"number"},"self-harm/intent":{"description":"The score for the category 'self-harm/intent'.","type":"number"},"sexual":{"description":"The score for the category 'sexual'.","type":"number"},"sexual/minors":{"description":"The score for the category 'sexual/minors'.","type":"number"},"violence":{"description":"The score for the category 'violence'.","type":"number"},"violence/graphic":{"description":"The score for the category 'violence/graphic'.","type":"number"}},"required":["hate","hate/threatening","harassment","harassment/threatening","illicit","illicit/violent","self-harm","self-harm/intent","self-harm/instructions","sexual","sexual/minors","violence","violence/graphic"],"type":"object"},"flagged":{"description":"Whether any of the below categories are flagged.","type":"boolean"}},"required":["flagged","categories","category_scores","category_applied_input_types"],"type":"object"},"type":"array"}},"required":["id","model","results"],"type":"object","x-oaiMeta":{"example":"{\n  \"id\": \"modr-0d9740456c391e43c445bf0f010940c7\",\n  \"model\": \"omni-moderation-latest\",\n  \"results\": [\n    {\n      \"flagged\": true,\n      \"categories\": {\n        \"harassment\": true,\n        \"harassment/threatening\": true,\n        \"sexual\": false,\n        \"hate\": false,\n        \"hate/threatening\": false,\n        \"illicit\": false,\n        \"illicit/violent\": false,\n        \"self-harm/intent\": false,\n        \"self-harm/instructions\": false,\n        \"self-harm\": false,\n        \"sexual/minors\": false,\n        \"violence\": true,\n        \"violence/graphic\": true\n      },\n      \"category_scores\": {\n        \"harassment\": 0.8189693396524255,\n        \"harassment/threatening\": 0.804985420696006,\n        \"sexual\": 1.573112165348997e-6,\n        \"hate\": 0.007562942636942845,\n        \"hate/threatening\": 0.004208854591835476,\n        \"illicit\": 0.030535955153511665,\n        \"illicit/violent\": 0.008925306722380033,\n        \"self-harm/intent\": 0.00023023930975076432,\n        \"self-harm/instructions\": 0.0002293869201073356,\n        \"self-harm\": 0.012598046106750154,\n        \"sexual/minors\": 2.212566909570261e-8,\n        \"violence\": 0.9999992735124786,\n        \"violence/graphic\": 0.843064871157054\n      },\n      \"category_applied_input_types\": {\n        \"harassment\": [\n          \"text\"\n        ],\n        \"harassment/threatening\": [\n          \"text\"\n        ],\n        \"sexual\": [\n          \"text\",\n          \"image\"\n        ],\n        \"hate\": [\n          \"text\"\n        ],\n        \"hate/threatening\": [\n          \"text\"\n        ],\n        \"illicit\": [\n          \"text\"\n        ],\n        \"illicit/violent\": [\n          \"text\"\n        ],\n        \"self-harm/intent\": [\n          \"text\",\n          \"image\"\n        ],\n        \"self-harm/instructions\": [\n          \"text\",\n          \"image\"\n        ],\n        \"self-harm\": [\n          \"text\",\n          \"image\"\n        ],\n        \"sexual/minors\": [\n          \"text\"\n        ],\n        \"violence\": [\n          \"text\",\n          \"image\"\n        ],\n        \"violence/graphic\": [\n          \"text\",\n          \"image\"\n        ]\n      }\n    }\n  ]\n}\n","name":"The moderation object"}},"CreateResponse":{"allOf":[{"$ref":"#/components/schemas/CreateModelResponseProperties"},{"$ref":"#/components/schemas/ResponseProperties"},{"properties":{"context_management":{"anyOf":[{"description":"Context management configuration for this request.\n","items":{"$ref":"#/components/schemas/ContextManagementParam"},"minItems":1,"type":"array"},{"type":"null"}]},"conversation":{"anyOf":[{"$ref":"#/components/schemas/ConversationParam"},{"type":"null"}]},"include":{"anyOf":[{"description":"Specify additional output data to include in the model response. Currently supported values are:\n- `web_search_call.action.sources`: Include the sources of the web search tool call.\n- `code_interpreter_call.outputs`: Includes the outputs of python code execution in code interpreter tool call items.\n- `computer_call_output.output.image_url`: Include image urls from the computer call output.\n- `file_search_call.results`: Include the search results of the file search tool call.\n- `message.input_image.image_url`: Include image urls from the input message.\n- `message.output_text.logprobs`: Include logprobs with assistant messages.\n- `reasoning.encrypted_content`: Includes an encrypted version of reasoning tokens in reasoning item outputs. This enables reasoning items to be used in multi-turn conversations when using the Responses API statelessly (like when the `store` parameter is set to `false`, or when an organization is enrolled in the zero data retention program).","items":{"$ref":"#/components/schemas/IncludeEnum"},"type":"array"},{"type":"null"}]},"input":{"$ref":"#/components/schemas/InputParam"},"instructions":{"anyOf":[{"description":"A system (or developer) message inserted into the model's context.\n\nWhen using along with `previous_response_id`, the instructions from a previous\nresponse will not be carried over to the next response. This makes it simple\nto swap out system (or developer) messages in new responses.\n","type":"string"},{"type":"null"}]},"parallel_tool_calls":{"anyOf":[{"default":true,"description":"Whether to allow the model to run tool calls in parallel.\n","type":"boolean"},{"type":"null"}]},"store":{"anyOf":[{"default":true,"description":"Whether to store the generated model response for later retrieval via\nAPI.\n","type":"boolean"},{"type":"null"}]},"stream":{"anyOf":[{"default":false,"description":"If set to true, the model response data will be streamed to the client\nas it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).\nSee the [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming)\nfor more information.\n","type":"boolean"},{"type":"null"}]},"stream_options":{"$ref":"#/components/schemas/ResponseStreamOptions"}},"type":"object"}]},"CreateSpeechRequest":{"additionalProperties":false,"properties":{"input":{"description":"The text to generate audio for. The maximum length is 4096 characters.","maxLength":4096,"type":"string"},"instructions":{"description":"Control the voice of your generated audio with additional instructions. Does not work with `tts-1` or `tts-1-hd`.","maxLength":4096,"type":"string"},"model":{"anyOf":[{"type":"string"},{"enum":["tts-1","tts-1-hd","gpt-4o-mini-tts","gpt-4o-mini-tts-2025-12-15"],"type":"string","x-openai-enum-deprecations":{"gpt-4o-mini-tts":{"message":"Announced shutdown date: 2027-01-06. See https://developers.openai.com/api/docs/deprecations for details and recommended replacements."},"gpt-4o-mini-tts-2025-12-15":{"message":"Announced shutdown date: 2027-01-06. See https://developers.openai.com/api/docs/deprecations for details and recommended replacements."},"tts-1":{"message":"Announced shutdown date: 2027-01-06. See https://developers.openai.com/api/docs/deprecations for details and recommended replacements."},"tts-1-hd":{"message":"Announced shutdown date: 2027-01-06. See https://developers.openai.com/api/docs/deprecations for details and recommended replacements."}}}],"description":"One of the available [TTS models](https://developers.openai.com/api/docs/guides/text-to-speech): `tts-1`, `tts-1-hd`, `gpt-4o-mini-tts`, or `gpt-4o-mini-tts-2025-12-15`.\n","x-oaiTypeLabel":"string"},"response_format":{"default":"mp3","description":"The format to audio in. Supported formats are `mp3`, `opus`, `aac`, `flac`, `wav`, and `pcm`.","enum":["mp3","opus","aac","flac","wav","pcm"],"type":"string"},"speed":{"default":1,"description":"The speed of the generated audio. Select a value from `0.25` to `4.0`. `1.0` is the default.","maximum":4,"minimum":0.25,"type":"number"},"stream_format":{"default":"audio","description":"The format to stream the audio in. Supported formats are `sse` and `audio`. `sse` is not supported for `tts-1` or `tts-1-hd`.","enum":["sse","audio"],"type":"string"},"voice":{"anyOf":[{"anyOf":[{"$ref":"#/components/schemas/VoiceIdsShared"},{"enum":["fable","onyx","nova"],"type":"string"}]},{"additionalProperties":false,"description":"Custom voice reference.","properties":{"id":{"description":"The custom voice ID, e.g. `voice_1234`.","example":"voice_1234","type":"string"}},"required":["id"],"type":"object"}],"description":"The voice to use when generating the audio. Supported built-in voices are `alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`, `shimmer`, `verse`, `marin`, and `cedar`. You may also provide a custom voice object with an `id`, for example `{ \"id\": \"voice_1234\" }`. Previews of the voices are available in the [Text to speech guide](https://developers.openai.com/api/docs/guides/text-to-speech#voice-options). Custom voices must be created from audio samples. Voices created from text prompts are supported only in Live.","title":"Voice"}},"required":["model","input","voice"],"type":"object"},"CreateTranscriptionRequest":{"additionalProperties":false,"properties":{"chunking_strategy":{"anyOf":[{"anyOf":[{"default":"auto","description":"Automatically set chunking parameters based on the audio. Must be set to `\"auto\"`.\n","enum":["auto"],"type":"string"},{"$ref":"#/components/schemas/VadConfig"}],"description":"Controls how the audio is cut into chunks. When set to `\"auto\"`, the server first normalizes loudness and then uses voice activity detection (VAD) to choose boundaries. `server_vad` object can be provided to tweak VAD detection parameters manually. If unset, the audio is transcribed as a single block. Required when using `gpt-4o-transcribe-diarize` for inputs longer than 30 seconds. ","x-oaiTypeLabel":"string"},{"type":"null"}]},"file":{"description":"The audio file object (not file name) to transcribe, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.\nThe request must include enough format metadata for the file to be identified. We recommend an extension-bearing filename and an appropriate content type.\n","format":"binary","type":"string","x-oaiTypeLabel":"file"},"include":{"description":"Additional information to include in the transcription response.\n`logprobs` will return the log probabilities of the tokens in the\nresponse to understand the model's confidence in the transcription.\n`logprobs` only works with response_format set to `json` and only with\nthe models `gpt-4o-transcribe`, `gpt-4o-mini-transcribe`, and `gpt-4o-mini-transcribe-2025-12-15`. This field is not supported when using `gpt-4o-transcribe-diarize`.\n","items":{"$ref":"#/components/schemas/TranscriptionInclude"},"type":"array"},"keywords":{"description":"Words or phrases to guide transcription of the input audio. Supported by `gpt-transcribe`.\n","items":{"type":"string"},"type":"array"},"known_speaker_names":{"description":"Optional list of speaker names that correspond to the audio samples provided in `known_speaker_references[]`. Each entry should be a short identifier (for example `customer` or `agent`). Up to 4 speakers are supported.\n","items":{"type":"string"},"maxItems":4,"type":"array"},"known_speaker_references":{"description":"Optional list of audio samples (as [data URLs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URLs)) that contain known speaker references matching `known_speaker_names[]`. Each sample must be between 2 and 10 seconds, and can use any of the same input audio formats supported by `file`.\n","items":{"type":"string"},"maxItems":4,"type":"array"},"language":{"description":"The language of the input audio. Supplying the input language in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format will improve accuracy and latency.\n","type":"string"},"languages":{"description":"Possible languages of the input audio, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. Supported by `gpt-transcribe`.\n","items":{"type":"string"},"minItems":1,"type":"array"},"model":{"anyOf":[{"type":"string"},{"enum":["whisper-1","gpt-transcribe","gpt-4o-transcribe","gpt-4o-mini-transcribe","gpt-4o-mini-transcribe-2025-12-15","gpt-4o-transcribe-diarize"],"type":"string","x-openai-enum-deprecations":{"gpt-4o-mini-transcribe":{"message":"Announced shutdown date: 2027-02-26. See https://developers.openai.com/api/docs/deprecations for details and recommended replacements."},"gpt-4o-mini-transcribe-2025-12-15":{"message":"Announced shutdown date: 2027-02-26. See https://developers.openai.com/api/docs/deprecations for details and recommended replacements."},"gpt-4o-transcribe":{"message":"Announced shutdown date: 2027-02-26. See https://developers.openai.com/api/docs/deprecations for details and recommended replacements."},"gpt-4o-transcribe-diarize":{"message":"Announced shutdown date: 2027-02-26. See https://developers.openai.com/api/docs/deprecations for details and recommended replacements."},"whisper-1":{"message":"Announced shutdown date: 2027-02-26. See https://developers.openai.com/api/docs/deprecations for details and recommended replacements."}}}],"description":"ID of the model to use. The options are `gpt-transcribe`, `gpt-4o-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `whisper-1` (which is powered by our open source Whisper V2 model), and `gpt-4o-transcribe-diarize`.\n","example":"gpt-4o-transcribe","x-oaiTypeLabel":"string"},"prompt":{"description":"An optional text to guide the model's style or continue a previous audio segment. The [prompt](https://developers.openai.com/api/docs/guides/speech-to-text#prompting) should match the audio language. This field is not supported when using `gpt-4o-transcribe-diarize`.\n","type":"string"},"response_format":{"$ref":"#/components/schemas/AudioResponseFormat"},"stream":{"anyOf":[{"default":false,"description":"If set to true, the model response data will be streamed to the client\nas it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).\nSee the [Streaming section of the Speech-to-Text guide](https://developers.openai.com/api/docs/guides/speech-to-text?lang=curl#streaming)\nfor more information.\n\nNote: Streaming is not supported for the `whisper-1` model and will be ignored.\n","type":"boolean"},{"type":"null"}]},"temperature":{"default":0,"description":"The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use [log probability](https://en.wikipedia.org/wiki/Log_probability) to automatically increase the temperature until certain thresholds are hit.\n","type":"number"},"timestamp_granularities":{"default":["segment"],"description":"The timestamp granularities to populate for this transcription. `response_format` must be set `verbose_json` to use timestamp granularities. Either or both of these options are supported: `word`, or `segment`. Note: There is no additional latency for segment timestamps, but generating word timestamps incurs additional latency.\nThis option is not available for `gpt-4o-transcribe-diarize`.\n","items":{"enum":["word","segment"],"type":"string"},"type":"array"}},"required":["file","model"],"type":"object"},"CreateTranscriptionResponseJson":{"description":"Represents a transcription response returned by model, based on the provided input.","properties":{"languages":{"description":"The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.\n","items":{"$ref":"#/components/schemas/TranscriptionLanguage"},"type":"array"},"logprobs":{"description":"The log probabilities of the tokens in the transcription. Only returned with the models `gpt-4o-transcribe` and `gpt-4o-mini-transcribe` if `logprobs` is added to the `include` array.\n","items":{"properties":{"bytes":{"description":"The bytes of the token.","items":{"type":"number"},"type":"array"},"logprob":{"description":"The log probability of the token.","type":"number"},"token":{"description":"The token in the transcription.","type":"string"}},"type":"object"},"optional":true,"type":"array"},"text":{"description":"The transcribed text.","type":"string"},"usage":{"description":"Token usage statistics for the request.","oneOf":[{"$ref":"#/components/schemas/TranscriptTextUsageTokens","title":"Token Usage"},{"$ref":"#/components/schemas/TranscriptTextUsageDuration","title":"Duration Usage"}],"type":"object"}},"required":["text"],"type":"object","x-oaiMeta":{"example":"{\n  \"text\": \"Imagine the wildest idea that you've ever had, and you're curious about how it might scale to something that's a 100, a 1,000 times bigger. This is a place where you can get to do that.\",\n  \"usage\": {\n    \"type\": \"tokens\",\n    \"input_tokens\": 14,\n    \"input_token_details\": {\n      \"text_tokens\": 10,\n      \"audio_tokens\": 4\n    },\n    \"output_tokens\": 101,\n    \"total_tokens\": 115\n  }\n}\n","group":"audio","name":"The transcription object (JSON)"}},"CreditsResponse":{"properties":{"data":{"properties":{"total_credits":{"description":"Total purchased credits expressed in USD.","format":"double","type":"number"},"total_usage":{"description":"Lifetime request usage expressed in USD.","format":"double","type":"number"}},"required":["total_credits","total_usage"],"type":"object"}},"required":["data"],"type":"object"},"CurrencyRatesData":{"properties":{"micros_precision":{"type":"integer"},"rates":{"additionalProperties":{"format":"int64","type":"integer"},"type":"object"}},"required":["rates","micros_precision"],"type":"object"},"CurrencyRatesEnvelope":{"properties":{"data":{"$ref":"#/components/schemas/CurrencyRatesData"},"success":{"type":"boolean"}},"required":["success","data"],"type":"object"},"CustomToolCall":{"description":"A call to a custom tool created by the model.\n","properties":{"call_id":{"description":"An identifier used to map this custom tool call to a tool call output.\n","type":"string"},"id":{"description":"The unique ID of the custom tool call in the OpenAI platform.\n","type":"string"},"input":{"description":"The input for the custom tool call generated by the model.\n","type":"string"},"name":{"description":"The name of the custom tool being called.\n","type":"string"},"type":{"description":"The type of the custom tool call. Always `custom_tool_call`.\n","enum":["custom_tool_call"],"type":"string","x-stainless-const":true}},"required":["type","call_id","name","input"],"title":"Custom tool call","type":"object"},"CustomToolCallOutput":{"description":"The output of a custom tool call from your code, being sent back to the model.\n","properties":{"call_id":{"description":"The call ID, used to map this custom tool call output to a custom tool call.\n","type":"string"},"id":{"description":"The unique ID of the custom tool call output in the OpenAI platform.\n","type":"string"},"output":{"description":"The output from the custom tool call generated by your code.\nCan be a string or an list of output content.\n","oneOf":[{"description":"A string of the output of the custom tool call.\n","title":"string output","type":"string"},{"description":"Text, image, or file output of the custom tool call.\n","items":{"$ref":"#/components/schemas/FunctionAndCustomToolCallOutput"},"title":"output content list","type":"array"}]},"type":{"description":"The type of the custom tool call output. Always `custom_tool_call_output`.\n","enum":["custom_tool_call_output"],"type":"string","x-stainless-const":true}},"required":["type","call_id","output"],"title":"Custom tool call output","type":"object"},"CustomToolChatCompletions":{"description":"A custom tool that processes input using a specified format.\n","properties":{"custom":{"description":"Properties of the custom tool.\n","properties":{"description":{"description":"Optional description of the custom tool, used to provide more context.\n","type":"string"},"format":{"description":"The input format for the custom tool. Default is unconstrained text.\n","oneOf":[{"additionalProperties":false,"description":"Unconstrained free-form text.","properties":{"type":{"description":"Unconstrained text format. Always `text`.","enum":["text"],"type":"string","x-stainless-const":true}},"required":["type"],"title":"Text format","type":"object"},{"additionalProperties":false,"description":"A grammar defined by the user.","properties":{"grammar":{"description":"Your chosen grammar.","properties":{"definition":{"description":"The grammar definition.","type":"string"},"syntax":{"description":"The syntax of the grammar definition. One of `lark` or `regex`.","enum":["lark","regex"],"type":"string"}},"required":["definition","syntax"],"title":"Grammar format","type":"object"},"type":{"description":"Grammar format. Always `grammar`.","enum":["grammar"],"type":"string","x-stainless-const":true}},"required":["type","grammar"],"title":"Grammar format","type":"object"}]},"name":{"description":"The name of the custom tool, used to identify it in tool calls.","type":"string"}},"required":["name"],"title":"Custom tool properties","type":"object"},"type":{"description":"The type of the custom tool. Always `custom`.","enum":["custom"],"type":"string","x-stainless-const":true}},"required":["type","custom"],"title":"Custom tool","type":"object"},"CustomToolParam":{"additionalProperties":true,"description":"Opaque upstream schema placeholder for CustomToolParam; see overlay x-ohmygpt-opaque-upstream-schemas for rationale.","properties":{"type":{"type":"string"}},"required":["type"],"type":"object","x-ohmygpt-opaque":true,"x-ohmygpt-upstream-ref":"CustomToolParam"},"DataPolicy":{"properties":{"moderation":{"type":"string"},"retention":{"type":"string"},"training":{"type":"boolean"}},"type":"object"},"DetailEnum":{"enum":["low","high","auto"],"type":"string"},"DirectCaller":{"description":"Tool invocation directly from the model.","properties":{"type":{"type":"string"}},"required":["type"],"type":"object","x-upstream-stub":true},"DoubleClickAction":{"additionalProperties":true,"description":"Opaque upstream schema placeholder for DoubleClickAction; see overlay x-ohmygpt-opaque-upstream-schemas for rationale.","properties":{"type":{"type":"string"}},"required":["type"],"type":"object","x-ohmygpt-opaque":true,"x-ohmygpt-upstream-ref":"DoubleClickAction"},"DragParam":{"additionalProperties":true,"description":"Opaque upstream schema placeholder for DragParam; see overlay x-ohmygpt-opaque-upstream-schemas for rationale.","properties":{"type":{"type":"string"}},"required":["type"],"type":"object","x-ohmygpt-opaque":true,"x-ohmygpt-upstream-ref":"DragParam"},"DynamicRetrievalConfig":{"description":"Describes the options to customize dynamic retrieval.","type":"object","x-upstream-stub":true},"EasyInputMessage":{"description":"A message input to the model with a role indicating instruction following\nhierarchy. Instructions given with the `developer` or `system` role take\nprecedence over instructions given with the `user` role. Messages with the\n`assistant` role are presumed to have been generated by the model in previous\ninteractions.\n","properties":{"content":{"description":"Text, image, or audio input to the model, used to generate a response.\nCan also contain previous assistant responses.\n","oneOf":[{"description":"A text input to the model.\n","title":"Text input","type":"string"},{"$ref":"#/components/schemas/InputMessageContentList"}]},"phase":{"anyOf":[{"$ref":"#/components/schemas/MessagePhase"},{"type":"null"}]},"role":{"description":"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.\n","enum":["user","assistant","system","developer"],"type":"string"},"type":{"description":"The type of the message input. Always `message`.\n","enum":["message"],"type":"string","x-stainless-const":true}},"required":["role","content"],"title":"Input message","type":"object"},"EffortLevel":{"description":"All possible effort levels.","enum":["low","medium","high","max"],"title":"EffortLevel","type":"string"},"Embedding":{"description":"Represents an embedding vector returned by embedding endpoint.\n","properties":{"embedding":{"description":"The embedding vector, which is a list of floats. The length of vector depends on the model as listed in the [embedding guide](https://platform.openai.com/docs/guides/embeddings).\n","items":{"format":"float","type":"number"},"type":"array"},"index":{"description":"The index of the embedding in the list of embeddings.","type":"integer"},"object":{"description":"The object type, which is always \"embedding\".","enum":["embedding"],"type":"string","x-stainless-const":true}},"required":["index","object","embedding"],"type":"object","x-oaiMeta":{"example":"{\n  \"object\": \"embedding\",\n  \"embedding\": [\n    0.0023064255,\n    -0.009327292,\n    .... (1536 floats total for ada-002)\n    -0.0028842222,\n  ],\n  \"index\": 0\n}\n","name":"The embedding object"}},"EnterpriseContact":{"properties":{"company":{"maxLength":120,"type":"string"},"email":{"description":"Where the reply goes.","format":"email","maxLength":254,"type":"string"},"interests":{"items":{"enum":["routing","byok","capacity","pricing","other"],"type":"string"},"type":"array"},"locale":{"description":"The language the reply should be written in.","example":"en-US","type":"string"},"message":{"maxLength":2000,"type":"string"},"monthly_spend":{"description":"Expected monthly spend in US dollars.","enum":["under_1k","1k_10k","10k_50k","over_50k"],"type":"string"},"name":{"maxLength":80,"type":"string"},"topic":{"enum":["enterprise"],"type":"string"}},"required":["topic","email","company"],"type":"object"},"ExecutableCode":{"description":"Code generated by the model that is meant to be executed, and the result\nreturned to the model.","type":"object","x-upstream-stub":true},"FidelityMatrix":{"properties":{"routes":{"additionalProperties":{"$ref":"#/components/schemas/RouteFidelity"},"type":"object"}},"required":["routes"],"type":"object"},"FileCitationBody":{"description":"A citation to a file.","properties":{"file_id":{"description":"The ID of the file.","type":"string"},"filename":{"description":"The filename of the file cited.","type":"string"},"index":{"description":"The index of the file in the list of files.","type":"integer"},"type":{"default":"file_citation","description":"The type of the file citation. Always `file_citation`.","enum":["file_citation"],"type":"string","x-stainless-const":true}},"required":["type","file_id","index","filename"],"title":"File citation","type":"object"},"FileData":{"description":"URI based data.","properties":{"displayName":{"description":"Optional. Specifies the name used to refer to this file to the model (e.g.\n\"my_file.pdf\"). Used as the file reference identifier when\n`verbalization_mode` is set to `REFERENCE_ONLY`.","type":"string"},"fileUri":{"description":"Required. URI.","type":"string"},"mimeType":{"description":"Optional. The IANA standard MIME type of the source data.","type":"string"}},"required":["fileUri"],"type":"object"},"FilePath":{"description":"A path to a file.\n","properties":{"file_id":{"description":"The ID of the file.\n","type":"string"},"index":{"description":"The index of the file in the list of files.\n","type":"integer"},"type":{"description":"The type of the file path. Always `file_path`.\n","enum":["file_path"],"type":"string","x-stainless-const":true}},"required":["type","file_id","index"],"title":"File path","type":"object"},"FileSearch":{"description":"The FileSearch tool that retrieves knowledge from Semantic Retrieval corpora.\nFiles are imported to Semantic Retrieval corpora using the ImportFile API.","properties":{"fileSearchStoreNames":{"description":"Required. The names of the file_search_stores to retrieve from.\nExample: `fileSearchStores/my-file-search-store-123`","items":{"type":"string"},"type":"array"},"metadataFilter":{"description":"Optional. Metadata filter to apply to the semantic retrieval documents and chunks.","type":"string"},"topK":{"description":"Optional. The number of semantic retrieval chunks to retrieve.","format":"int32","type":"integer"}},"required":["fileSearchStoreNames"],"type":"object"},"FileSearchTool":{"additionalProperties":true,"description":"Opaque upstream schema placeholder for FileSearchTool; see overlay x-ohmygpt-opaque-upstream-schemas for rationale.","properties":{"type":{"type":"string"}},"required":["type"],"type":"object","x-ohmygpt-opaque":true,"x-ohmygpt-upstream-ref":"FileSearchTool"},"FileSearchToolCall":{"description":"The results of a file search tool call. See the\n[file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information.\n","properties":{"id":{"description":"The unique ID of the file search tool call.\n","type":"string"},"queries":{"description":"The queries used to search for files.\n","items":{"type":"string"},"type":"array"},"results":{"anyOf":[{"description":"The results of the file search tool call.\n","items":{"properties":{"attributes":{"$ref":"#/components/schemas/VectorStoreFileAttributes"},"file_id":{"description":"The unique ID of the file.\n","type":"string"},"filename":{"description":"The name of the file.\n","type":"string"},"score":{"description":"The relevance score of the file - a value between 0 and 1.\n","format":"float","type":"number"},"text":{"description":"The text that was retrieved from the file.\n","type":"string"}},"type":"object"},"type":"array"},{"type":"null"}]},"status":{"description":"The status of the file search tool call. One of `in_progress`,\n`searching`, `incomplete` or `failed`,\n","enum":["in_progress","searching","completed","incomplete","failed"],"type":"string"},"type":{"description":"The type of the file search tool call. Always `file_search_call`.\n","enum":["file_search_call"],"type":"string","x-stainless-const":true}},"required":["id","type","status","queries"],"title":"File search tool call","type":"object"},"FunctionAndCustomToolCallOutput":{"additionalProperties":true,"description":"Opaque upstream schema placeholder for FunctionAndCustomToolCallOutput; see overlay x-ohmygpt-opaque-upstream-schemas for rationale.","properties":{"type":{"type":"string"}},"required":["type"],"type":"object","x-ohmygpt-opaque":true,"x-ohmygpt-upstream-ref":"FunctionAndCustomToolCallOutput"},"FunctionCall":{"description":"A predicted `FunctionCall` returned from the model that contains\na string representing the `FunctionDeclaration.name` with the\narguments and their values.","type":"object","x-upstream-stub":true},"FunctionCallItemStatus":{"enum":["in_progress","completed","incomplete"],"type":"string"},"FunctionCallOutputItemParam":{"description":"The output of a function tool call.","properties":{"call_id":{"description":"The unique ID of the function tool call generated by the model.","maxLength":64,"minLength":1,"type":"string"},"id":{"anyOf":[{"description":"The unique ID of the function tool call output. Populated when this item is returned via API.","example":"fc_123","type":"string"},{"type":"null"}]},"output":{"description":"Text, image, or file output of the function tool call.","oneOf":[{"description":"A JSON string of the output of the function tool call.","maxLength":10485760,"type":"string"},{"description":"An array of content outputs (text, image, file) for the function tool call.","items":{"description":"A piece of message content, such as text, an image, or a file.","discriminator":{"mapping":{"input_file":"#/components/schemas/InputFileContentParam","input_image":"#/components/schemas/InputImageContentParamAutoParam","input_text":"#/components/schemas/InputTextContentParam"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/InputTextContentParam"},{"$ref":"#/components/schemas/InputImageContentParamAutoParam"},{"$ref":"#/components/schemas/InputFileContentParam"}]},"type":"array"}]},"status":{"anyOf":[{"$ref":"#/components/schemas/FunctionCallItemStatus","description":"The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API."},{"type":"null"}]},"type":{"default":"function_call_output","description":"The type of the function tool call output. Always `function_call_output`.","enum":["function_call_output"],"type":"string","x-stainless-const":true}},"required":["call_id","type","output"],"title":"Function tool call output","type":"object"},"FunctionCallingConfig":{"description":"Configuration for specifying function calling behavior.","properties":{"allowedFunctionNames":{"description":"Optional. A set of function names that, when provided, limits the functions the model\nwill call.\n\nThis should only be set when the Mode is ANY or VALIDATED. Function names\nshould match [FunctionDeclaration.name]. When set, model will\npredict a function call from only allowed function names.","items":{"type":"string"},"type":"array"},"mode":{"description":"Optional. Specifies the mode in which function calling should execute. If\nunspecified, the default value will be set to AUTO.","enum":["MODE_UNSPECIFIED","AUTO","ANY","NONE","VALIDATED"],"type":"string"}},"type":"object"},"FunctionDeclaration":{"description":"Structured representation of a function declaration as defined by the\n[OpenAPI 3.03 specification](https://spec.openapis.org/oas/v3.0.3). Included\nin this declaration are the function name and parameters. This\nFunctionDeclaration is a representation of a block of code that can be used\nas a `Tool` by the model and executed by the client.","properties":{"behavior":{"description":"Optional. Specifies the function Behavior.\nCurrently only supported by the BidiGenerateContent method.","enum":["UNSPECIFIED","BLOCKING","NON_BLOCKING"],"type":"string"},"description":{"description":"Required. A brief description of the function.","type":"string"},"name":{"description":"Required. The name of the function.\nMust be a-z, A-Z, 0-9, or contain underscores, colons, dots, and dashes,\nwith a maximum length of 128.","type":"string"},"parameters":{"allOf":[{"$ref":"#/components/schemas/Schema"}],"description":"Optional. Describes the parameters to this function. Reflects the Open API 3.03\nParameter Object string Key: the name of the parameter. Parameter names are\ncase sensitive. Schema Value: the Schema defining the type used for the\nparameter."},"parametersJsonSchema":{"description":"Optional. Describes the parameters to the function in JSON Schema format. The schema\nmust describe an object where the properties are the parameters to the\nfunction. For example:\n\n```\n{\n  \"type\": \"object\",\n  \"properties\": {\n    \"name\": { \"type\": \"string\" },\n    \"age\": { \"type\": \"integer\" }\n  },\n  \"additionalProperties\": false,\n  \"required\": [\"name\", \"age\"],\n  \"propertyOrdering\": [\"name\", \"age\"]\n}\n```\n\nThis field is mutually exclusive with `parameters`."},"response":{"allOf":[{"$ref":"#/components/schemas/Schema"}],"description":"Optional. Describes the output from this function in JSON Schema format. Reflects the\nOpen API 3.03 Response Object. The Schema defines the type used for the\nresponse value of the function."},"responseJsonSchema":{"description":"Optional. Describes the output from this function in JSON Schema format. The value\nspecified by the schema is the response value of the function.\n\nThis field is mutually exclusive with `response`."}},"required":["name","description"],"type":"object"},"FunctionObject":{"properties":{"description":{"description":"A description of what the function does, used by the model to choose when and how to call the function.","type":"string"},"name":{"description":"The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.","type":"string"},"parameters":{"$ref":"#/components/schemas/FunctionParameters"},"strict":{"anyOf":[{"default":false,"description":"Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. Learn more about Structured Outputs in the [function calling guide](https://platform.openai.com/docs/guides/function-calling).","type":"boolean"},{"type":"null"}]}},"required":["name"],"type":"object"},"FunctionParameters":{"additionalProperties":true,"description":"The parameters the functions accepts, described as a JSON Schema object. See the [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format. \n\nOmitting `parameters` defines a function with an empty parameter list.","type":"object"},"FunctionResponse":{"description":"The result output from a `FunctionCall` that contains a string\nrepresenting the `FunctionDeclaration.name` and a structured JSON\nobject containing any output from the function is used as context to\nthe model. This should contain the result of a`FunctionCall` made\nbased on model prediction.","type":"object","x-upstream-stub":true},"FunctionShellAction":{"description":"Execute a shell command.","properties":{"commands":{"items":{"description":"A list of commands to run.","type":"string"},"type":"array"},"max_output_length":{"anyOf":[{"description":"Optional maximum number of characters to return from each command.","type":"integer"},{"type":"null"}]},"timeout_ms":{"anyOf":[{"description":"Optional timeout in milliseconds for the commands.","type":"integer"},{"type":"null"}]}},"required":["commands","timeout_ms","max_output_length"],"title":"Shell exec action","type":"object"},"FunctionShellActionParam":{"additionalProperties":true,"description":"Opaque upstream schema placeholder for FunctionShellActionParam; see overlay x-ohmygpt-opaque-upstream-schemas for rationale.","properties":{"type":{"type":"string"}},"required":["type"],"type":"object","x-ohmygpt-opaque":true,"x-ohmygpt-upstream-ref":"FunctionShellActionParam"},"FunctionShellCall":{"description":"A tool call that executes one or more shell commands in a managed environment.","properties":{"action":{"$ref":"#/components/schemas/FunctionShellAction","description":"The shell commands and limits that describe how to run the tool call."},"call_id":{"description":"The unique ID of the shell tool call generated by the model.","type":"string"},"created_by":{"description":"The ID of the entity that created this tool call.","type":"string"},"environment":{"anyOf":[{"discriminator":{"mapping":{"container_reference":"#/components/schemas/ContainerReferenceResource","local":"#/components/schemas/LocalEnvironmentResource"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/LocalEnvironmentResource"},{"$ref":"#/components/schemas/ContainerReferenceResource"}]},{"type":"null"}]},"id":{"description":"The unique ID of the shell tool call. Populated when this item is returned via API.","type":"string"},"status":{"$ref":"#/components/schemas/LocalShellCallStatus","description":"The status of the shell call. One of `in_progress`, `completed`, or `incomplete`."},"type":{"default":"shell_call","description":"The type of the item. Always `shell_call`.","enum":["shell_call"],"type":"string","x-stainless-const":true}},"required":["type","id","call_id","action","status","environment"],"title":"Shell tool call","type":"object"},"FunctionShellCallItemParam":{"description":"A tool representing a request to execute one or more shell commands.","properties":{"action":{"$ref":"#/components/schemas/FunctionShellActionParam","description":"The shell commands and limits that describe how to run the tool call."},"call_id":{"description":"The unique ID of the shell tool call generated by the model.","maxLength":64,"minLength":1,"type":"string"},"environment":{"anyOf":[{"description":"The environment to execute the shell commands in.","oneOf":[{"$ref":"#/components/schemas/LocalEnvironmentParam"},{"$ref":"#/components/schemas/ContainerReferenceParam"}]},{"type":"null"}]},"id":{"anyOf":[{"description":"The unique ID of the shell tool call. Populated when this item is returned via API.","example":"sh_123","type":"string"},{"type":"null"}]},"status":{"anyOf":[{"$ref":"#/components/schemas/FunctionShellCallItemStatus","description":"The status of the shell call. One of `in_progress`, `completed`, or `incomplete`."},{"type":"null"}]},"type":{"default":"shell_call","description":"The type of the item. Always `shell_call`.","enum":["shell_call"],"type":"string","x-stainless-const":true}},"required":["call_id","type","action"],"title":"Shell tool call","type":"object"},"FunctionShellCallItemStatus":{"additionalProperties":true,"description":"Opaque upstream schema placeholder for FunctionShellCallItemStatus; see overlay x-ohmygpt-opaque-upstream-schemas for rationale.","properties":{"type":{"type":"string"}},"required":["type"],"type":"object","x-ohmygpt-opaque":true,"x-ohmygpt-upstream-ref":"FunctionShellCallItemStatus"},"FunctionShellCallOutput":{"description":"The output of a shell tool call that was emitted.","properties":{"call_id":{"description":"The unique ID of the shell tool call generated by the model.","type":"string"},"created_by":{"description":"The identifier of the actor that created the item.","type":"string"},"id":{"description":"The unique ID of the shell call output. Populated when this item is returned via API.","type":"string"},"max_output_length":{"anyOf":[{"description":"The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output.","type":"integer"},{"type":"null"}]},"output":{"description":"An array of shell call output contents","items":{"$ref":"#/components/schemas/FunctionShellCallOutputContent"},"type":"array"},"status":{"$ref":"#/components/schemas/LocalShellCallOutputStatusEnum","description":"The status of the shell call output. One of `in_progress`, `completed`, or `incomplete`."},"type":{"default":"shell_call_output","description":"The type of the shell call output. Always `shell_call_output`.","enum":["shell_call_output"],"type":"string","x-stainless-const":true}},"required":["type","id","call_id","status","output","max_output_length"],"title":"Shell call output","type":"object"},"FunctionShellCallOutputContent":{"description":"The content of a shell tool call output that was emitted.","properties":{"created_by":{"description":"The identifier of the actor that created the item.","type":"string"},"outcome":{"description":"Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk.","oneOf":[{"$ref":"#/components/schemas/FunctionShellCallOutputTimeoutOutcome"},{"$ref":"#/components/schemas/FunctionShellCallOutputExitOutcome"}],"title":"Shell call outcome"},"stderr":{"description":"The standard error output that was captured.","type":"string"},"stdout":{"description":"The standard output that was captured.","type":"string"}},"required":["stdout","stderr","outcome"],"title":"Shell call output content","type":"object"},"FunctionShellCallOutputContentParam":{"additionalProperties":true,"description":"Opaque upstream schema placeholder for FunctionShellCallOutputContentParam; see overlay x-ohmygpt-opaque-upstream-schemas for rationale.","properties":{"type":{"type":"string"}},"required":["type"],"type":"object","x-ohmygpt-opaque":true,"x-ohmygpt-upstream-ref":"FunctionShellCallOutputContentParam"},"FunctionShellCallOutputExitOutcome":{"additionalProperties":true,"description":"Opaque upstream schema placeholder for FunctionShellCallOutputExitOutcome; see overlay x-ohmygpt-opaque-upstream-schemas for rationale.","properties":{"type":{"type":"string"}},"required":["type"],"type":"object","x-ohmygpt-opaque":true,"x-ohmygpt-upstream-ref":"FunctionShellCallOutputExitOutcome"},"FunctionShellCallOutputItemParam":{"description":"The streamed output items emitted by a shell tool call.","properties":{"call_id":{"description":"The unique ID of the shell tool call generated by the model.","maxLength":64,"minLength":1,"type":"string"},"id":{"anyOf":[{"description":"The unique ID of the shell tool call output. Populated when this item is returned via API.","example":"sho_123","type":"string"},{"type":"null"}]},"max_output_length":{"anyOf":[{"description":"The maximum number of UTF-8 characters captured for this shell call's combined output.","type":"integer"},{"type":"null"}]},"output":{"description":"Captured chunks of stdout and stderr output, along with their associated outcomes.","items":{"$ref":"#/components/schemas/FunctionShellCallOutputContentParam"},"type":"array"},"status":{"anyOf":[{"$ref":"#/components/schemas/FunctionShellCallItemStatus","description":"The status of the shell call output."},{"type":"null"}]},"type":{"default":"shell_call_output","description":"The type of the item. Always `shell_call_output`.","enum":["shell_call_output"],"type":"string","x-stainless-const":true}},"required":["call_id","type","output"],"title":"Shell tool call output","type":"object"},"FunctionShellCallOutputTimeoutOutcome":{"additionalProperties":true,"description":"Opaque upstream schema placeholder for FunctionShellCallOutputTimeoutOutcome; see overlay x-ohmygpt-opaque-upstream-schemas for rationale.","properties":{"type":{"type":"string"}},"required":["type"],"type":"object","x-ohmygpt-opaque":true,"x-ohmygpt-upstream-ref":"FunctionShellCallOutputTimeoutOutcome"},"FunctionShellToolParam":{"additionalProperties":true,"description":"Opaque upstream schema placeholder for FunctionShellToolParam; see overlay x-ohmygpt-opaque-upstream-schemas for rationale.","properties":{"type":{"type":"string"}},"required":["type"],"type":"object","x-ohmygpt-opaque":true,"x-ohmygpt-upstream-ref":"FunctionShellToolParam"},"FunctionTool":{"description":"Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).","properties":{"description":{"anyOf":[{"description":"A description of the function. Used by the model to determine whether or not to call the function.","type":"string"},{"type":"null"}]},"name":{"description":"The name of the function to call.","type":"string"},"parameters":{"anyOf":[{"additionalProperties":{},"description":"A JSON schema object describing the parameters of the function.","type":"object","x-oaiTypeLabel":"map"},{"type":"null"}]},"strict":{"anyOf":[{"description":"Whether to enforce strict parameter validation. Default `true`.","type":"boolean"},{"type":"null"}]},"type":{"default":"function","description":"The type of the function tool. Always `function`.","enum":["function"],"type":"string","x-stainless-const":true}},"required":["type","name","strict","parameters"],"title":"Function","type":"object"},"FunctionToolCall":{"description":"A tool call to run a function. See the \n[function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information.\n","properties":{"arguments":{"description":"A JSON string of the arguments to pass to the function.\n","type":"string"},"call_id":{"description":"The unique ID of the function tool call generated by the model.\n","type":"string"},"id":{"description":"The unique ID of the function tool call.\n","type":"string"},"name":{"description":"The name of the function to run.\n","type":"string"},"status":{"description":"The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n","enum":["in_progress","completed","incomplete"],"type":"string"},"type":{"description":"The type of the function tool call. Always `function_call`.\n","enum":["function_call"],"type":"string","x-stainless-const":true}},"required":["type","call_id","name","arguments"],"title":"Function tool call","type":"object"},"GatewayAnthropicMessageResponse":{"allOf":[{"$ref":"#/components/schemas/Message"},{"$ref":"#/components/schemas/GatewaySyncResponseAugmentation"}]},"GatewayChatChoiceAugmentation":{"properties":{"native_finish_reason":{"description":"The finish reason exactly as the provider reported it.","type":"string"}},"type":"object"},"GatewayChatCompletionResponse":{"allOf":[{"$ref":"#/components/schemas/CreateChatCompletionResponse"},{"$ref":"#/components/schemas/GatewaySyncResponseAugmentation"},{"properties":{"choices":{"items":{"$ref":"#/components/schemas/GatewayChatChoiceAugmentation"},"type":"array"}},"type":"object"}]},"GatewayEmbeddingResponse":{"allOf":[{"$ref":"#/components/schemas/CreateEmbeddingResponse"},{"$ref":"#/components/schemas/GatewaySyncResponseAugmentation"}]},"GatewayResponsesResponse":{"allOf":[{"$ref":"#/components/schemas/Response"},{"$ref":"#/components/schemas/GatewaySyncResponseAugmentation"}]},"GatewaySyncResponseAugmentation":{"properties":{"provider":{"description":"The provider that served the request.","type":"string"},"usage":{"$ref":"#/components/schemas/GatewayUsageAugmentation"}},"type":"object"},"GatewayUsageAugmentation":{"description":"What this request cost. All amounts are in Credits, not USD.","properties":{"billing_mode":{"description":"Request charge mode.","enum":["platform","byok"],"type":"string"},"cost":{"description":"Total user charge in Credits.","format":"int64","type":"integer"},"is_byok":{"description":"Whether this request used BYOK mode.","type":"boolean"}},"type":"object"},"GeminiAudioResponseFormat":{"description":"Configuration for audio output format.","type":"object","x-upstream-stub":true},"GeminiError":{"description":"A Google API error. `details[].reason` carries the machine-readable code, such as `INSUFFICIENT_CREDITS`.","properties":{"error":{"properties":{"code":{"description":"The HTTP status","type":"integer"},"details":{"items":{"properties":{"@type":{"type":"string"},"domain":{"type":"string"},"reason":{"type":"string"}},"type":"object"},"type":"array"},"message":{"type":"string"},"status":{"description":"The Google status name, such as `INVALID_ARGUMENT`","type":"string"}},"type":"object"}},"type":"object"},"GeminiGenerateContentRequest":{"description":"A Gemini `GenerateContentRequest` as sent over REST. The model is named in the path, so the body has no `model`; every other field is Google's.\n","properties":{"cachedContent":{"description":"A cached content name (`cachedContents/{id}`); Gemini models only.","type":"string"},"contents":{"description":"The conversation so far; one item for a single-turn request.","items":{"$ref":"#/components/schemas/Content"},"type":"array"},"generationConfig":{"$ref":"#/components/schemas/GenerationConfig"},"labels":{"additionalProperties":{"type":"string"},"type":"object"},"safetySettings":{"items":{"$ref":"#/components/schemas/SafetySetting"},"type":"array"},"serviceTier":{"$ref":"#/components/schemas/GeminiServiceTier"},"store":{"type":"boolean"},"systemInstruction":{"$ref":"#/components/schemas/Content"},"toolConfig":{"$ref":"#/components/schemas/ToolConfig"},"tools":{"items":{"$ref":"#/components/schemas/GeminiTool"},"type":"array"}},"required":["contents"],"type":"object"},"GeminiServiceTier":{"enum":["unspecified","standard","flex","priority"],"type":"string"},"GeminiTool":{"description":"Tool details that the model may use to generate response.\n\nA `Tool` is a piece of code that enables the system to interact with\nexternal systems to perform an action, or set of actions, outside of\nknowledge and scope of the model.","properties":{"codeExecution":{"allOf":[{"$ref":"#/components/schemas/CodeExecution"}],"description":"Optional. Enables the model to execute code as part of generation."},"computerUse":{"allOf":[{"$ref":"#/components/schemas/ComputerUse"}],"description":"Optional. Tool to support the model interacting directly with the computer.\nIf enabled, it automatically populates computer-use specific Function\nDeclarations."},"fileSearch":{"allOf":[{"$ref":"#/components/schemas/FileSearch"}],"description":"Optional. FileSearch tool type.\nTool to retrieve knowledge from Semantic Retrieval corpora."},"functionDeclarations":{"description":"Optional. A list of `FunctionDeclarations` available to the model that can be used\nfor function calling.\n\nThe model or system does not execute the function. Instead the defined\nfunction may be returned as a FunctionCall\nwith arguments to the client side for execution. The model may decide to\ncall a subset of these functions by populating\nFunctionCall in the response. The next\nconversation turn may contain a\nFunctionResponse\nwith the Content.role \"function\" generation context for the next model\nturn.","items":{"$ref":"#/components/schemas/FunctionDeclaration"},"type":"array"},"googleMaps":{"allOf":[{"$ref":"#/components/schemas/GoogleMaps"}],"description":"Optional. Tool that allows grounding the model's response with geospatial context\nrelated to the user's query."},"googleSearch":{"allOf":[{"$ref":"#/components/schemas/GoogleSearch"}],"description":"Optional. GoogleSearch tool type.\nTool to support Google Search in Model. Powered by Google."},"googleSearchRetrieval":{"allOf":[{"$ref":"#/components/schemas/GoogleSearchRetrieval"}],"description":"Optional. Retrieval tool that is powered by Google search."},"mcpServers":{"description":"Optional. MCP Servers to connect to.","items":{"$ref":"#/components/schemas/McpServer"},"type":"array"},"urlContext":{"allOf":[{"$ref":"#/components/schemas/UrlContext"}],"description":"Optional. Tool to support URL context retrieval."}},"type":"object"},"GenerateContentRequest":{"description":"Request to generate a completion from the model.","properties":{"cachedContent":{"description":"Optional. The name of the content\n[cached](https://aistudio.google.com/docs/caching) to use as context\nto serve the prediction. Format: `cachedContents/{cachedContent}`","type":"string"},"contents":{"description":"Required. The content of the current conversation with the model.\n\nFor single-turn queries, this is a single instance. For multi-turn queries\nlike\n[chat](https://aistudio.google.com/docs/text-generation#multi-turn-conversations),\nthis is a repeated field that contains the conversation history and the\nlatest request.","items":{"$ref":"#/components/schemas/Content"},"type":"array"},"continuationToken":{"description":"Optional. An opaque continuation token used to resume generation from a\nprevious `GenerateContent` or `StreamGenerateContent` response that stopped\nwith `finish_reason` set to `CONTINUATION`. Note that `contents` is\nmandatory and must identically replicate the prompt and conversation\nhistory from the initial request when continuation token is provided in\na request.","format":"byte","type":"string"},"generationConfig":{"allOf":[{"$ref":"#/components/schemas/GenerationConfig"}],"description":"Optional. Configuration options for model generation and outputs."},"labels":{"additionalProperties":{"type":"string"},"description":"Optional. Labels with user-defined metadata for the request.\n\nOptional. Labels must follow standard unified Cloud label requirements:\n- Label keys must start with a letter.\n- Label keys and values can be no longer than 63 characters (Unicode\n  codepoints) and can only contain lowercase letters, numeric characters,\n  underscores, and dashes.\n- International characters are allowed.\n\nUsage:\n-  Safety identifiers from aggregators: Use the key `safety_identifier`\n   (e.g. `{\"safety_identifier\": \"user_session_123\"}`)","type":"object"},"model":{"description":"Required. The name of the `Model` to use for generating the completion.\n\nFormat: `models/{model}`.","type":"string"},"safetySettings":{"description":"Optional. A list of unique `SafetySetting` instances for blocking unsafe content.\n\nThis will be enforced on the `GenerateContentRequest.contents` and\n`GenerateContentResponse.candidates`. There should not be more than one\nsetting for each `SafetyCategory` type. The API will block any contents and\nresponses that fail to meet the thresholds set by these settings. This list\noverrides the default settings for each `SafetyCategory` specified in the\nsafety_settings. If there is no `SafetySetting` for a given\n`SafetyCategory` provided in the list, the API will use the default safety\nsetting for that category. Harm categories HARM_CATEGORY_HATE_SPEECH,\nHARM_CATEGORY_SEXUALLY_EXPLICIT, HARM_CATEGORY_DANGEROUS_CONTENT,\nHARM_CATEGORY_HARASSMENT, HARM_CATEGORY_CIVIC_INTEGRITY,\nHARM_CATEGORY_JAILBREAK are supported.\nRefer to the [guide](https://aistudio.google.com/docs/safety-settings)\nfor detailed information on available safety settings. Also refer to the\n[Safety guidance](https://aistudio.google.com/docs/safety-guidance) to\nlearn how to incorporate safety considerations in your AI applications.","items":{"$ref":"#/components/schemas/SafetySetting"},"type":"array"},"serviceTier":{"allOf":[{"$ref":"#/components/schemas/GeminiServiceTier"}],"description":"Optional. The service tier of the request."},"store":{"description":"Optional. Configures the logging behavior for a given request. If set, it takes\nprecedence over the project-level logging config.","type":"boolean"},"systemInstruction":{"allOf":[{"$ref":"#/components/schemas/Content"}],"description":"Optional. Developer set [system\ninstruction(s)](https://aistudio.google.com/docs/text-generation#system-instructions).\nCurrently, text only."},"toolConfig":{"allOf":[{"$ref":"#/components/schemas/ToolConfig"}],"description":"Optional. Tool configuration for any `Tool` specified in the request. Refer to the\n[Function calling\nguide](https://aistudio.google.com/docs/function-calling#function_calling_modes)\nfor a usage example."},"tools":{"description":"Optional. A list of `Tools` the `Model` may use to generate the next response.\n\nA `Tool` is a piece of code that enables the system to interact with\nexternal systems to perform an action, or set of actions, outside of\nknowledge and scope of the `Model`. Supported `Tool`s are `Function` and\n`code_execution`. Refer to the [Function\ncalling](https://aistudio.google.com/docs/function-calling) and the\n[Code execution](https://aistudio.google.com/docs/code-execution)\nguides to learn more.","items":{"$ref":"#/components/schemas/GeminiTool"},"type":"array"}},"required":["model","contents"],"type":"object"},"GenerateContentResponse":{"description":"Response from the model supporting multiple candidate responses.\n\nSafety ratings and content filtering are reported for both\nprompt in `GenerateContentResponse.prompt_feedback` and for each candidate\nin `finish_reason` and in `safety_ratings`. The API:\n - Returns either all requested candidates or none of them\n - Returns no candidates at all only if there was something wrong with the\n   prompt (check `prompt_feedback`)\n - Reports feedback on each candidate in `finish_reason` and\n   `safety_ratings`.","properties":{"candidates":{"description":"Candidate responses from the model.","items":{"$ref":"#/components/schemas/Candidate"},"type":"array"},"modelStatus":{"allOf":[{"$ref":"#/components/schemas/ModelStatus"}],"description":"Output only. The current model status of this model.","readOnly":true},"modelVersion":{"description":"Output only. The model version used to generate the response.","readOnly":true,"type":"string"},"promptFeedback":{"allOf":[{"$ref":"#/components/schemas/PromptFeedback"}],"description":"Returns the prompt's feedback related to the content filters."},"responseId":{"description":"Output only. response_id is used to identify each response.","readOnly":true,"type":"string"},"usageMetadata":{"allOf":[{"$ref":"#/components/schemas/UsageMetadata"}],"description":"Output only. Metadata on the generation requests' token usage.","readOnly":true}},"type":"object"},"GenerationConfig":{"description":"Configuration options for model generation and outputs. Not all parameters\nare configurable for every model.","properties":{"_responseJsonSchema":{"deprecated":true,"description":"Optional. Output schema of the generated response. This is an alternative to\n`response_schema` that accepts [JSON Schema](https://json-schema.org/).\n\nIf set, `response_schema` must be omitted, but `response_mime_type` is\nrequired.\n\nWhile the full JSON Schema may be sent, not all features are supported.\nSpecifically, only the following properties are supported:\n\n- `$id`\n- `$defs`\n- `$ref`\n- `$anchor`\n- `type`\n- `format`\n- `title`\n- `description`\n- `enum` (for strings and numbers)\n- `items`\n- `prefixItems`\n- `minItems`\n- `maxItems`\n- `minimum`\n- `maximum`\n- `anyOf`\n- `oneOf` (interpreted the same as `anyOf`)\n- `properties`\n- `additionalProperties`\n- `required`\n\nThe non-standard `propertyOrdering` property may also be set.\n\nCyclic references are unrolled to a limited degree and, as such, may only\nbe used within non-required properties. (Nullable properties are not\nsufficient.) If `$ref` is set on a sub-schema, no other properties, except\nfor than those starting as a `$`, may be set.\n\nDeprecated. Use `response_format` instead."},"audioTranscriptionConfig":{"allOf":[{"$ref":"#/components/schemas/AudioTranscriptionConfig"}],"description":"Optional. Config for audio transcription (speech recognition)."},"candidateCount":{"description":"Optional. Number of generated responses to return. If unset, this will default\nto 1. Please note that this doesn't work for previous generation\nmodels (Gemini 1.0 family)","format":"int32","type":"integer"},"enableAffectiveDialog":{"description":"Optional. If enabled, the model will detect emotions and adapt its responses\naccordingly.","type":"boolean"},"enableEnhancedCivicAnswers":{"description":"Optional. Enables enhanced civic answers. It may not be available for all models.","type":"boolean"},"frequencyPenalty":{"description":"Optional. Frequency penalty applied to the next token's logprobs, multiplied by the\nnumber of times each token has been seen in the respponse so far.\n\nA positive penalty will discourage the use of tokens that have already\nbeen used, proportional to the number of times the token has been used:\nThe more a token is used, the more difficult it is for the model to use\nthat token again increasing the vocabulary of responses.\n\nCaution: A _negative_ penalty will encourage the model to reuse tokens\nproportional to the number of times the token has been used. Small\nnegative values will reduce the vocabulary of a response. Larger negative\nvalues will cause the model to start repeating a common token  until it\nhits the max_output_tokens\nlimit.","format":"float","type":"number"},"imageConfig":{"allOf":[{"$ref":"#/components/schemas/ImageConfig"}],"description":"Optional. Config for image generation.\nAn error will be returned if this field is set for models that don't\nsupport these config options."},"logprobs":{"description":"Optional. Only valid if response_logprobs=True.\nThis sets the number of top logprobs, including the chosen candidate, to\nreturn at each decoding step in the Candidate.logprobs_result. The\nnumber must be in the range of [0, 20].","format":"int32","type":"integer"},"maxOutputTokens":{"description":"Optional. The maximum number of tokens to include in a response candidate.\n\nNote: The default value varies by model, see the `Model.output_token_limit`\nattribute of the `Model` returned from the `getModel` function.","format":"int32","type":"integer"},"mediaResolution":{"description":"Optional. If specified, the media resolution specified will be used.","enum":["MEDIA_RESOLUTION_UNSPECIFIED","MEDIA_RESOLUTION_LOW","MEDIA_RESOLUTION_MEDIUM","MEDIA_RESOLUTION_HIGH"],"type":"string"},"presencePenalty":{"description":"Optional. Presence penalty applied to the next token's logprobs if the token has\nalready been seen in the response.\n\nThis penalty is binary on/off and not dependant on the number of times the\ntoken is used (after the first). Use\nfrequency_penalty\nfor a penalty that increases with each use.\n\nA positive penalty will discourage the use of tokens that have already\nbeen used in the response, increasing the vocabulary.\n\nA negative penalty will encourage the use of tokens that have already been\nused in the response, decreasing the vocabulary.","format":"float","type":"number"},"responseFormat":{"allOf":[{"$ref":"#/components/schemas/ResponseFormatConfig"}],"description":"Optional. Configuration for the response output format. Allows specifying output\nconfiguration per modality (text, audio, image) in a flat structure."},"responseJsonSchema":{"description":"Optional. An internal detail. Use `responseJsonSchema` rather than this field."},"responseLogprobs":{"description":"Optional. If true, export the logprobs results in response.","type":"boolean"},"responseMimeType":{"description":"Optional. MIME type of the generated candidate text.\nSupported MIME types are:\n`text/plain`: (default) Text output.\n`application/json`: JSON response in the response candidates.\n`text/x.enum`: ENUM as a string response in the response candidates.\nRefer to the\n[docs](https://aistudio.google.com/docs/file-input-methods#text-file-types)\nfor a list of all supported text MIME types.","type":"string"},"responseModalities":{"description":"Optional. The requested modalities of the response. Represents the set of modalities\nthat the model can return, and should be expected in the response. This is\nan exact match to the modalities of the response.\n\nA model may have multiple combinations of supported modalities. If the\nrequested modalities do not match any of the supported combinations, an\nerror will be returned.\n\nAn empty list is equivalent to requesting only text.","items":{"enum":["MODALITY_UNSPECIFIED","TEXT","IMAGE","AUDIO"],"type":"string"},"type":"array"},"responseSchema":{"allOf":[{"$ref":"#/components/schemas/Schema"}],"deprecated":true,"description":"Optional. Output schema of the generated candidate text. Schemas must be a\nsubset of the [OpenAPI schema](https://spec.openapis.org/oas/v3.0.3#schema)\nand can be objects, primitives or arrays.\n\nIf set, a compatible `response_mime_type` must also be set.\nCompatible MIME types:\n`application/json`: Schema for JSON response.\nRefer to the [JSON text generation\nguide](https://aistudio.google.com/docs/structured-output) for more\ndetails.\n\nDeprecated. Use `response_format` instead."},"seed":{"description":"Optional. Seed used in decoding. If not set, the request uses a randomly generated\nseed.","format":"int32","type":"integer"},"speechConfig":{"allOf":[{"$ref":"#/components/schemas/SpeechConfig"}],"description":"Optional. The speech generation config."},"stopSequences":{"description":"Optional. The set of character sequences (up to 5) that will stop output generation.\nIf specified, the API will stop at the first appearance of a\n`stop_sequence`. The stop sequence will not be included as part of the\nresponse.","items":{"type":"string"},"type":"array"},"temperature":{"description":"Optional. Controls the randomness of the output.\n\nNote: The default value varies by model, see the `Model.temperature`\nattribute of the `Model` returned from the `getModel` function.\n\nValues can range from [0.0, 2.0].\n\nThis field is no longer supported and is silently ignored on Gemini 3.6\nFlash and newer models.","format":"float","type":"number"},"thinkingConfig":{"allOf":[{"$ref":"#/components/schemas/ThinkingConfig"}],"description":"Optional. Config for thinking features.\nAn error will be returned if this field is set for models that don't\nsupport thinking."},"topK":{"description":"Optional. The maximum number of tokens to consider when sampling.\n\nGemini models use Top-p (nucleus) sampling or a combination of Top-k and\nnucleus sampling. Top-k sampling considers the set of `top_k` most probable\ntokens. Models running with nucleus sampling don't allow top_k setting.\n\nNote: The default value varies by `Model` and is specified by\nthe`Model.top_p` attribute returned from the `getModel` function. An empty\n`top_k` attribute indicates that the model doesn't apply top-k sampling\nand doesn't allow setting `top_k` on requests.\n\nThis field is no longer supported and is silently ignored on Gemini 3.6\nFlash and newer models.","format":"int32","type":"integer"},"topP":{"description":"Optional. The maximum cumulative probability of tokens to consider when sampling.\n\nThe model uses combined Top-k and Top-p (nucleus) sampling.\n\nTokens are sorted based on their assigned probabilities so that only the\nmost likely tokens are considered. Top-k sampling directly limits the\nmaximum number of tokens to consider, while Nucleus sampling limits the\nnumber of tokens based on the cumulative probability.\n\nNote: The default value varies by `Model` and is specified by\nthe`Model.top_p` attribute returned from the `getModel` function. An empty\n`top_k` attribute indicates that the model doesn't apply top-k sampling\nand doesn't allow setting `top_k` on requests.\n\nThis field is no longer supported and is silently ignored on Gemini 3.6\nFlash and newer models.","format":"float","type":"number"},"translationConfig":{"allOf":[{"$ref":"#/components/schemas/TranslationConfig"}],"description":"Optional. Config for translation."}},"type":"object"},"GenerationLookupEnvelope":{"properties":{"data":{"$ref":"#/components/schemas/RequestReceipt"}},"required":["data"],"type":"object"},"GenerativeLanguageModality":{"type":"string","x-upstream-stub":true},"GoogleAiGenerativelanguageV1betaGroundingSupport":{"description":"Grounding support.","type":"object","x-upstream-stub":true},"GoogleMaps":{"description":"The GoogleMaps Tool that provides geospatial context for the user's query.","properties":{"enableWidget":{"description":"Optional. Whether to return a widget context token in the GroundingMetadata of the\nresponse. Developers can use the widget context token to render a Google\nMaps widget with geospatial context related to the places that the model\nreferences in the response.","type":"boolean"}},"type":"object"},"GoogleSearch":{"description":"GoogleSearch tool type.\nTool to support Google Search in Model. Powered by Google.","properties":{"searchTypes":{"allOf":[{"$ref":"#/components/schemas/SearchTypes"}],"description":"Optional. The set of search types to enable. If not set, web search is\nenabled by default."},"timeRangeFilter":{"allOf":[{"$ref":"#/components/schemas/Interval"}],"description":"Optional. Filter search results to a specific time range.\nIf customers set a start time, they must set an end time (and vice\nversa)."}},"type":"object"},"GoogleSearchRetrieval":{"description":"Tool to retrieve public web data for grounding, powered by Google.","properties":{"dynamicRetrievalConfig":{"allOf":[{"$ref":"#/components/schemas/DynamicRetrievalConfig"}],"description":"Specifies the dynamic retrieval configuration for the given source."}},"type":"object"},"GroundingAttribution":{"description":"Attribution for a source that contributed to an answer.","properties":{"content":{"allOf":[{"$ref":"#/components/schemas/Content"}],"description":"Grounding source content that makes up this attribution."},"sourceId":{"allOf":[{"$ref":"#/components/schemas/AttributionSourceId"}],"description":"Output only. Identifier for the source contributing to this attribution.","readOnly":true}},"type":"object"},"GroundingChunk":{"description":"A `GroundingChunk` represents a segment of supporting evidence that grounds\nthe model's response. It can be a chunk from the web, a retrieved context\nfrom a file, or information from Google Maps.","type":"object","x-upstream-stub":true},"GroundingMetadata":{"description":"Metadata returned to client when grounding is enabled.","properties":{"googleMapsWidgetContextToken":{"description":"Optional. Resource name of the Google Maps widget context token that can be used\nwith the PlacesContextElement widget in order to render contextual data.\nOnly populated in the case that grounding with Google Maps is enabled.","type":"string"},"groundingChunks":{"description":"List of supporting references retrieved from specified grounding source.\nWhen streaming, this only contains the grounding chunks that have not been\nincluded in the grounding metadata of previous responses.","items":{"$ref":"#/components/schemas/GroundingChunk"},"type":"array"},"groundingSupports":{"description":"List of grounding support.","items":{"$ref":"#/components/schemas/GoogleAiGenerativelanguageV1betaGroundingSupport"},"type":"array"},"imageSearchQueries":{"description":"Image search queries used for grounding.","items":{"type":"string"},"type":"array"},"retrievalMetadata":{"allOf":[{"$ref":"#/components/schemas/RetrievalMetadata"}],"description":"Metadata related to retrieval in the grounding flow."},"searchEntryPoint":{"allOf":[{"$ref":"#/components/schemas/SearchEntryPoint"}],"description":"Optional. Google search entry for the following-up web searches."},"webSearchQueries":{"description":"Web search queries for the following-up web search.","items":{"type":"string"},"type":"array"}},"type":"object"},"HarmCategory":{"enum":["HARM_CATEGORY_UNSPECIFIED","HARM_CATEGORY_DEROGATORY","HARM_CATEGORY_TOXICITY","HARM_CATEGORY_VIOLENCE","HARM_CATEGORY_SEXUAL","HARM_CATEGORY_MEDICAL","HARM_CATEGORY_DANGEROUS","HARM_CATEGORY_HARASSMENT","HARM_CATEGORY_HATE_SPEECH","HARM_CATEGORY_SEXUALLY_EXPLICIT","HARM_CATEGORY_DANGEROUS_CONTENT","HARM_CATEGORY_CIVIC_INTEGRITY","HARM_CATEGORY_JAILBREAK"],"type":"string"},"HttpxErrorResponse":{"properties":{"code":{"type":"integer"},"error":{"nullable":true},"error_type":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"success":{"enum":[false],"type":"boolean"},"type":{"type":"string"}},"required":["success","code","message"],"type":"object"},"Image":{"description":"Represents the content or the URL of an image generated by the OpenAI API.","properties":{"b64_json":{"description":"The base64-encoded JSON of the generated image. Returned by default for GPT image models, or when `response_format` is set to `b64_json` for models that support that parameter.","type":"string"},"revised_prompt":{"description":"The revised prompt used to generate the image, for models that support prompt revision. Not returned by GPT image models.","type":"string"},"url":{"description":"The URL of the generated image when `response_format` is set to `url` for models that support that parameter. Unsupported for GPT image models.","format":"uri","type":"string"}},"type":"object"},"ImageConfig":{"description":"Config for image generation features.","properties":{"aspectRatio":{"description":"Optional. The aspect ratio of the image to generate. Supported aspect ratios: `1:1`,\n`1:4`, `4:1`, `1:8`, `8:1`, `2:3`, `3:2`, `3:4`, `4:3`, `4:5`, `5:4`,\n`9:16`, `16:9`, or `21:9`.\n\nIf not specified, the model will choose a default aspect ratio based on any\nreference images provided.","type":"string"},"imageSize":{"description":"Optional. Specifies the size of generated images. Supported values are `512`, `1K`,\n`2K`, `4K`. If not specified, the model will use default value `1K`.","type":"string"}},"type":"object"},"ImageDetail":{"enum":["low","high","auto"],"type":"string"},"ImageGenInputUsageDetails":{"description":"The input tokens detailed information for the image generation.","properties":{"image_tokens":{"description":"The number of image tokens in the input prompt.","type":"integer"},"text_tokens":{"description":"The number of text tokens in the input prompt.","type":"integer"}},"required":["text_tokens","image_tokens"],"title":"Input usage details","type":"object"},"ImageGenOutputTokensDetails":{"description":"The output token details for the image generation.","properties":{"image_tokens":{"description":"The number of image output tokens generated by the model.","type":"integer"},"text_tokens":{"description":"The number of text output tokens generated by the model.","type":"integer"}},"required":["image_tokens","text_tokens"],"title":"Image generation output token details","type":"object"},"ImageGenTool":{"additionalProperties":true,"description":"Opaque upstream schema placeholder for ImageGenTool; see overlay x-ohmygpt-opaque-upstream-schemas for rationale.","properties":{"type":{"type":"string"}},"required":["type"],"type":"object","x-ohmygpt-opaque":true,"x-ohmygpt-upstream-ref":"ImageGenTool"},"ImageGenToolCall":{"description":"An image generation request made by the model.\n","properties":{"id":{"description":"The unique ID of the image generation call.\n","type":"string"},"result":{"anyOf":[{"description":"The generated image encoded in base64.\n","type":"string"},{"type":"null"}]},"status":{"description":"The status of the image generation call.\n","enum":["in_progress","completed","generating","failed"],"type":"string"},"type":{"description":"The type of the image generation call. Always `image_generation_call`.\n","enum":["image_generation_call"],"type":"string","x-stainless-const":true}},"required":["type","id","status","result"],"title":"Image generation call","type":"object"},"ImageGenUsage":{"description":"For `gpt-image-1` only, the token usage information for the image generation.","properties":{"input_tokens":{"description":"The number of tokens (images and text) in the input prompt.","type":"integer"},"input_tokens_details":{"$ref":"#/components/schemas/ImageGenInputUsageDetails"},"output_tokens":{"description":"The number of output tokens generated by the model.","type":"integer"},"output_tokens_details":{"$ref":"#/components/schemas/ImageGenOutputTokensDetails"},"total_tokens":{"description":"The total number of tokens (images and text) used for the image generation.","type":"integer"}},"required":["input_tokens","total_tokens","output_tokens","input_tokens_details"],"title":"Image generation usage","type":"object"},"ImageResponseFormat":{"description":"Configuration for image output format.","type":"object","x-upstream-stub":true},"ImagesResponse":{"description":"The response from the image generation endpoint.","properties":{"background":{"description":"The background parameter used for the image generation. Either `transparent` or `opaque`.","enum":["transparent","opaque"],"type":"string"},"created":{"description":"The Unix timestamp (in seconds) of when the image was created.","format":"unixtime","type":"integer"},"data":{"description":"The list of generated images.","items":{"$ref":"#/components/schemas/Image"},"type":"array"},"output_format":{"description":"The output format of the generated image.","enum":["png","webp","jpeg","gif","svg"],"type":"string"},"quality":{"description":"The quality of the image generated. One of `low`, `medium`, `high`, `xhigh`, or `max`.","enum":["low","medium","high","xhigh","max"],"type":"string"},"safety_identifier":{"description":"The effective safety identifier used for safety monitoring and abuse detection. This is the non-empty `safety_identifier` from the request, or the deprecated `user` value when `safety_identifier` is omitted, null, or empty.","type":["string","null"]},"size":{"anyOf":[{"type":"string"},{"enum":["1024x1024","1024x1536","1536x1024"],"type":"string"}],"description":"The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`."},"svg_usage":{"description":"Token usage for the model that authored the SVG, separate from image rendering usage.","properties":{"input_tokens":{"type":"integer"},"model":{"type":"string"},"output_tokens":{"type":"integer"},"reasoning_tokens":{"type":"integer"},"total_tokens":{"type":"integer"}},"required":["model","input_tokens","output_tokens","total_tokens","reasoning_tokens"],"type":"object"},"usage":{"$ref":"#/components/schemas/ImageGenUsage"}},"required":["created"],"title":"Image generation response","type":"object","x-oaiMeta":{"example":"{\n  \"created\": 1713833628,\n  \"data\": [\n    {\n      \"b64_json\": \"...\"\n    }\n  ],\n  \"background\": \"transparent\",\n  \"output_format\": \"png\",\n  \"size\": \"1024x1024\",\n  \"quality\": \"high\",\n  \"usage\": {\n    \"total_tokens\": 100,\n    \"input_tokens\": 50,\n    \"output_tokens\": 50,\n    \"input_tokens_details\": {\n      \"text_tokens\": 10,\n      \"image_tokens\": 40\n    }\n  }\n}\n","group":"images","name":"The image generation response"}},"IncidentDetailData":{"properties":{"incident":{"$ref":"#/components/schemas/IncidentRecord"},"updates":{"items":{"$ref":"#/components/schemas/IncidentUpdateRecord"},"type":"array"}},"required":["incident","updates"],"type":"object"},"IncidentDetailEnvelope":{"properties":{"data":{"$ref":"#/components/schemas/IncidentDetailData"},"success":{"type":"boolean"}},"required":["success","data"],"type":"object"},"IncidentListEnvelope":{"properties":{"data":{"items":{"$ref":"#/components/schemas/IncidentRecord"},"type":"array"},"success":{"type":"boolean"}},"required":["success","data"],"type":"object"},"IncidentRecord":{"properties":{"acknowledged_at":{"format":"date-time","type":"string"},"affected_components":{"items":{"type":"string"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"string"},"resolved_at":{"format":"date-time","type":"string"},"severity":{"type":"string"},"status":{"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","severity","status","title","affected_components","created_at","updated_at"],"type":"object"},"IncidentUpdateRecord":{"properties":{"body":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"string"},"status":{"type":"string"}},"required":["id","status","body","created_at"],"type":"object"},"IncludeEnum":{"description":"Specify additional output data to include in the model response. Currently supported values are:\n- `web_search_call.action.sources`: Include the sources of the web search tool call.\n- `code_interpreter_call.outputs`: Includes the outputs of python code execution in code interpreter tool call items.\n- `computer_call_output.output.image_url`: Include image urls from the computer call output.\n- `file_search_call.results`: Include the search results of the file search tool call.\n- `message.input_image.image_url`: Include image urls from the input message.\n- `message.output_text.logprobs`: Include logprobs with assistant messages.\n- `reasoning.encrypted_content`: Includes an encrypted version of reasoning tokens in reasoning item outputs. This enables reasoning items to be used in multi-turn conversations when using the Responses API statelessly (like when the `store` parameter is set to `false`, or when an organization is enrolled in the zero data retention program).","enum":["file_search_call.results","web_search_call.results","web_search_call.action.sources","message.input_image.image_url","computer_call_output.output.image_url","code_interpreter_call.outputs","reasoning.encrypted_content","message.output_text.logprobs"],"type":"string"},"InputContent":{"discriminator":{"mapping":{"input_file":"#/components/schemas/InputFileContent","input_image":"#/components/schemas/InputImageContent","input_text":"#/components/schemas/InputTextContent"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/InputTextContent"},{"$ref":"#/components/schemas/InputImageContent"},{"$ref":"#/components/schemas/InputFileContent"}]},"InputContentBlock":{"discriminator":{"mapping":{"bash_code_execution_tool_result":"#/components/schemas/RequestBashCodeExecutionToolResultBlock","code_execution_tool_result":"#/components/schemas/RequestCodeExecutionToolResultBlock","container_upload":"#/components/schemas/RequestContainerUploadBlock","document":"#/components/schemas/RequestDocumentBlock","image":"#/components/schemas/RequestImageBlock","redacted_thinking":"#/components/schemas/RequestRedactedThinkingBlock","search_result":"#/components/schemas/RequestSearchResultBlock","server_tool_use":"#/components/schemas/RequestServerToolUseBlock","text":"#/components/schemas/RequestTextBlock","text_editor_code_execution_tool_result":"#/components/schemas/RequestTextEditorCodeExecutionToolResultBlock","thinking":"#/components/schemas/RequestThinkingBlock","tool_result":"#/components/schemas/RequestToolResultBlock","tool_search_tool_result":"#/components/schemas/RequestToolSearchToolResultBlock","tool_use":"#/components/schemas/RequestToolUseBlock","web_fetch_tool_result":"#/components/schemas/RequestWebFetchToolResultBlock","web_search_tool_result":"#/components/schemas/RequestWebSearchToolResultBlock"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/RequestTextBlock","description":"Regular text content."},{"$ref":"#/components/schemas/RequestImageBlock","description":"Image content specified directly as base64 data or as a reference via a URL."},{"$ref":"#/components/schemas/RequestDocumentBlock","description":"Document content, either specified directly as base64 data, as text, or as a reference via a URL."},{"$ref":"#/components/schemas/RequestSearchResultBlock","description":"A search result block containing source, title, and content from search operations."},{"$ref":"#/components/schemas/RequestThinkingBlock","description":"A block specifying internal thinking by the model."},{"$ref":"#/components/schemas/RequestRedactedThinkingBlock","description":"A block specifying internal, redacted thinking by the model."},{"$ref":"#/components/schemas/RequestToolUseBlock","description":"A block indicating a tool use by the model."},{"$ref":"#/components/schemas/RequestToolResultBlock","description":"A block specifying the results of a tool use by the model."},{"$ref":"#/components/schemas/RequestServerToolUseBlock"},{"$ref":"#/components/schemas/RequestWebSearchToolResultBlock"},{"$ref":"#/components/schemas/RequestWebFetchToolResultBlock"},{"$ref":"#/components/schemas/RequestCodeExecutionToolResultBlock"},{"$ref":"#/components/schemas/RequestBashCodeExecutionToolResultBlock"},{"$ref":"#/components/schemas/RequestTextEditorCodeExecutionToolResultBlock"},{"$ref":"#/components/schemas/RequestToolSearchToolResultBlock"},{"$ref":"#/components/schemas/RequestContainerUploadBlock"}]},"InputFileContent":{"description":"A file input to the model.","properties":{"file_data":{"description":"The content of the file to be sent to the model.\n","type":"string"},"file_id":{"anyOf":[{"description":"The ID of the file to be sent to the model.","type":"string"},{"type":"null"}]},"file_url":{"description":"The URL of the file to be sent to the model.","type":"string"},"filename":{"description":"The name of the file to be sent to the model.","type":"string"},"type":{"default":"input_file","description":"The type of the input item. Always `input_file`.","enum":["input_file"],"type":"string","x-stainless-const":true}},"required":["type"],"title":"Input file","type":"object"},"InputFileContentParam":{"description":"A file input to the model.","properties":{"file_data":{"anyOf":[{"description":"The base64-encoded data of the file to be sent to the model.","maxLength":33554432,"type":"string"},{"type":"null"}]},"file_id":{"anyOf":[{"description":"The ID of the file to be sent to the model.","example":"file-123","type":"string"},{"type":"null"}]},"file_url":{"anyOf":[{"description":"The URL of the file to be sent to the model.","type":"string"},{"type":"null"}]},"filename":{"anyOf":[{"description":"The name of the file to be sent to the model.","type":"string"},{"type":"null"}]},"type":{"default":"input_file","description":"The type of the input item. Always `input_file`.","enum":["input_file"],"type":"string","x-stainless-const":true}},"required":["type"],"title":"Input file","type":"object"},"InputImageContent":{"description":"An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).","properties":{"detail":{"$ref":"#/components/schemas/ImageDetail","description":"The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`."},"file_id":{"anyOf":[{"description":"The ID of the file to be sent to the model.","type":"string"},{"type":"null"}]},"image_url":{"anyOf":[{"description":"The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.","type":"string"},{"type":"null"}]},"type":{"default":"input_image","description":"The type of the input item. Always `input_image`.","enum":["input_image"],"type":"string","x-stainless-const":true}},"required":["type","detail"],"title":"Input image","type":"object"},"InputImageContentParamAutoParam":{"description":"An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision)","properties":{"detail":{"anyOf":[{"$ref":"#/components/schemas/DetailEnum","description":"The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`."},{"type":"null"}]},"file_id":{"anyOf":[{"description":"The ID of the file to be sent to the model.","example":"file-123","type":"string"},{"type":"null"}]},"image_url":{"anyOf":[{"description":"The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.","maxLength":20971520,"type":"string"},{"type":"null"}]},"type":{"default":"input_image","description":"The type of the input item. Always `input_image`.","enum":["input_image"],"type":"string","x-stainless-const":true}},"required":["type"],"title":"Input image","type":"object"},"InputItem":{"oneOf":[{"$ref":"#/components/schemas/EasyInputMessage"},{"$ref":"#/components/schemas/Item","description":"An item representing part of the context for the response to be\ngenerated by the model. Can contain text, images, and audio inputs,\nas well as previous assistant responses and tool call outputs.\n","title":"Item","type":"object"},{"$ref":"#/components/schemas/ItemReferenceParam"}]},"InputMessageContentList":{"description":"A list of one or many input items to the model, containing different content \ntypes.\n","items":{"$ref":"#/components/schemas/InputContent"},"title":"Input item content list","type":"array"},"InputParam":{"description":"Text, image, or file inputs to the model, used to generate a response.\n\nLearn more:\n- [Text inputs and outputs](https://platform.openai.com/docs/guides/text)\n- [Image inputs](https://platform.openai.com/docs/guides/images)\n- [File inputs](https://platform.openai.com/docs/guides/pdf-files)\n- [Conversation state](https://platform.openai.com/docs/guides/conversation-state)\n- [Function calling](https://platform.openai.com/docs/guides/function-calling)\n","oneOf":[{"description":"A text input to the model, equivalent to a text input with the\n`user` role.\n","title":"Text input","type":"string"},{"description":"A list of one or many input items to the model, containing\ndifferent content types.\n","items":{"$ref":"#/components/schemas/InputItem"},"title":"Input item list","type":"array"}]},"InputSchema":{"additionalProperties":true,"properties":{"properties":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Properties"},"required":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Required"},"type":{"const":"object","title":"Type","type":"string"}},"required":["type"],"title":"InputSchema","type":"object"},"InputTextContent":{"description":"A text input to the model.","properties":{"text":{"description":"The text input to the model.","type":"string"},"type":{"default":"input_text","description":"The type of the input item. Always `input_text`.","enum":["input_text"],"type":"string","x-stainless-const":true}},"required":["type","text"],"title":"Input text","type":"object"},"InputTextContentParam":{"description":"A text input to the model.","properties":{"text":{"description":"The text input to the model.","maxLength":10485760,"type":"string"},"type":{"default":"input_text","description":"The type of the input item. Always `input_text`.","enum":["input_text"],"type":"string","x-stainless-const":true}},"required":["type","text"],"title":"Input text","type":"object"},"Interval":{"description":"Represents a time interval, encoded as a Timestamp start (inclusive) and a\nTimestamp end (exclusive).","type":"object","x-upstream-stub":true},"Item":{"description":"Content item used to generate a response.\n","oneOf":[{"$ref":"#/components/schemas/RespInputMessage"},{"$ref":"#/components/schemas/OutputMessage"},{"$ref":"#/components/schemas/FileSearchToolCall"},{"$ref":"#/components/schemas/ComputerToolCall"},{"$ref":"#/components/schemas/ComputerCallOutputItemParam"},{"$ref":"#/components/schemas/WebSearchToolCall"},{"$ref":"#/components/schemas/FunctionToolCall"},{"$ref":"#/components/schemas/FunctionCallOutputItemParam"},{"$ref":"#/components/schemas/ReasoningItem"},{"$ref":"#/components/schemas/CompactionSummaryItemParam"},{"$ref":"#/components/schemas/ImageGenToolCall"},{"$ref":"#/components/schemas/CodeInterpreterToolCall"},{"$ref":"#/components/schemas/LocalShellToolCall"},{"$ref":"#/components/schemas/LocalShellToolCallOutput"},{"$ref":"#/components/schemas/FunctionShellCallItemParam"},{"$ref":"#/components/schemas/FunctionShellCallOutputItemParam"},{"$ref":"#/components/schemas/ApplyPatchToolCallItemParam"},{"$ref":"#/components/schemas/ApplyPatchToolCallOutputItemParam"},{"$ref":"#/components/schemas/MCPListTools"},{"$ref":"#/components/schemas/MCPApprovalRequest"},{"$ref":"#/components/schemas/MCPApprovalResponse"},{"$ref":"#/components/schemas/MCPToolCall"},{"$ref":"#/components/schemas/CustomToolCallOutput"},{"$ref":"#/components/schemas/CustomToolCall"}],"type":"object"},"ItemReferenceParam":{"description":"An internal identifier for an item to reference.","properties":{"id":{"description":"The ID of the item to reference.","type":"string"},"type":{"anyOf":[{"default":"item_reference","description":"The type of item to reference. Always `item_reference`.","enum":["item_reference"],"type":"string","x-stainless-const":true},{"type":"null"}]}},"required":["id"],"title":"Item reference","type":"object"},"JsonOutputFormat":{"additionalProperties":false,"properties":{"schema":{"additionalProperties":true,"description":"The JSON schema of the format","title":"Schema","type":"object"},"type":{"const":"json_schema","title":"Type","type":"string"}},"required":["schema","type"],"title":"JsonOutputFormat","type":"object"},"JsonValue":{},"KeyPressAction":{"additionalProperties":true,"description":"Opaque upstream schema placeholder for KeyPressAction; see overlay x-ohmygpt-opaque-upstream-schemas for rationale.","properties":{"type":{"type":"string"}},"required":["type"],"type":"object","x-ohmygpt-opaque":true,"x-ohmygpt-upstream-ref":"KeyPressAction"},"LanguageAuto":{"description":"Indicates the language of the audio should be automatically detected.","type":"object","x-upstream-stub":true},"LanguageHints":{"description":"Provides hints to the model about possible languages present in the audio.","type":"object","x-upstream-stub":true},"LatLng":{"description":"An object that represents a latitude/longitude pair. This is expressed as a\npair of doubles to represent degrees latitude and degrees longitude. Unless\nspecified otherwise, this object must conform to the\nWGS84 standard. Values must be within normalized ranges.","type":"object","x-upstream-stub":true},"LocalEnvironmentParam":{"additionalProperties":true,"description":"Opaque upstream schema placeholder for LocalEnvironmentParam; see overlay x-ohmygpt-opaque-upstream-schemas for rationale.","properties":{"type":{"type":"string"}},"required":["type"],"type":"object","x-ohmygpt-opaque":true,"x-ohmygpt-upstream-ref":"LocalEnvironmentParam"},"LocalEnvironmentResource":{"description":"Represents the use of a local environment to perform shell actions.","properties":{"type":{"default":"local","description":"The environment type. Always `local`.","enum":["local"],"type":"string","x-stainless-const":true}},"required":["type"],"title":"Local Environment","type":"object"},"LocalShellCallOutputStatusEnum":{"enum":["in_progress","completed","incomplete"],"type":"string"},"LocalShellCallStatus":{"enum":["in_progress","completed","incomplete"],"type":"string"},"LocalShellExecAction":{"description":"Execute a shell command on the server.","properties":{"command":{"description":"The command to run.","items":{"type":"string"},"type":"array"},"env":{"additionalProperties":{"type":"string"},"description":"Environment variables to set for the command.","type":"object","x-oaiTypeLabel":"map"},"timeout_ms":{"anyOf":[{"description":"Optional timeout in milliseconds for the command.","type":"integer"},{"type":"null"}]},"type":{"default":"exec","description":"The type of the local shell action. Always `exec`.","enum":["exec"],"type":"string","x-stainless-const":true},"user":{"anyOf":[{"description":"Optional user to run the command as.","type":"string"},{"type":"null"}]},"working_directory":{"anyOf":[{"description":"Optional working directory to run the command in.","type":"string"},{"type":"null"}]}},"required":["type","command","env"],"title":"Local shell exec action","type":"object"},"LocalShellToolCall":{"description":"A tool call to run a command on the local shell.\n","properties":{"action":{"$ref":"#/components/schemas/LocalShellExecAction"},"call_id":{"description":"The unique ID of the local shell tool call generated by the model.\n","type":"string"},"id":{"description":"The unique ID of the local shell call.\n","type":"string"},"status":{"description":"The status of the local shell call.\n","enum":["in_progress","completed","incomplete"],"type":"string"},"type":{"description":"The type of the local shell call. Always `local_shell_call`.\n","enum":["local_shell_call"],"type":"string","x-stainless-const":true}},"required":["type","id","call_id","action","status"],"title":"Local shell call","type":"object"},"LocalShellToolCallOutput":{"description":"The output of a local shell tool call.\n","properties":{"id":{"description":"The unique ID of the local shell tool call generated by the model.\n","type":"string"},"output":{"description":"A JSON string of the output of the local shell tool call.\n","type":"string"},"status":{"anyOf":[{"description":"The status of the item. One of `in_progress`, `completed`, or `incomplete`.\n","enum":["in_progress","completed","incomplete"],"type":"string"},{"type":"null"}]},"type":{"description":"The type of the local shell tool call output. Always `local_shell_call_output`.\n","enum":["local_shell_call_output"],"type":"string","x-stainless-const":true}},"required":["id","type","call_id","output"],"title":"Local shell call output","type":"object"},"LocalShellToolParam":{"additionalProperties":true,"description":"Opaque upstream schema placeholder for LocalShellToolParam; see overlay x-ohmygpt-opaque-upstream-schemas for rationale.","properties":{"type":{"type":"string"}},"required":["type"],"type":"object","x-ohmygpt-opaque":true,"x-ohmygpt-upstream-ref":"LocalShellToolParam"},"LogProb":{"description":"The log probability of a token.","properties":{"bytes":{"items":{"type":"integer"},"type":"array"},"logprob":{"type":"number"},"token":{"type":"string"},"top_logprobs":{"items":{"$ref":"#/components/schemas/TopLogProb"},"type":"array"}},"required":["token","logprob","bytes","top_logprobs"],"title":"Log probability","type":"object"},"LogprobsResult":{"description":"Logprobs Result","properties":{"chosenCandidates":{"description":"Length = total number of decoding steps.\nThe chosen candidates may or may not be in top_candidates.","items":{"$ref":"#/components/schemas/LogprobsResultCandidate"},"type":"array"},"logProbabilitySum":{"description":"Sum of log probabilities for all tokens.","format":"float","type":"number"},"topCandidates":{"description":"Length = total number of decoding steps.","items":{"$ref":"#/components/schemas/TopCandidates"},"type":"array"}},"type":"object"},"LogprobsResultCandidate":{"description":"Candidate for the logprobs token and score.","type":"object","x-upstream-stub":true},"LossyField":{"properties":{"degradation":{"type":"string"},"field":{"type":"string"},"impact":{"type":"string"}},"required":["field","degradation","impact"],"type":"object"},"MCPApprovalRequest":{"description":"A request for human approval of a tool invocation.\n","properties":{"arguments":{"description":"A JSON string of arguments for the tool.\n","type":"string"},"id":{"description":"The unique ID of the approval request.\n","type":"string"},"name":{"description":"The name of the tool to run.\n","type":"string"},"server_label":{"description":"The label of the MCP server making the request.\n","type":"string"},"type":{"description":"The type of the item. Always `mcp_approval_request`.\n","enum":["mcp_approval_request"],"type":"string","x-stainless-const":true}},"required":["type","id","server_label","name","arguments"],"title":"MCP approval request","type":"object"},"MCPApprovalResponse":{"description":"A response to an MCP approval request.\n","properties":{"approval_request_id":{"description":"The ID of the approval request being answered.\n","type":"string"},"approve":{"description":"Whether the request was approved.\n","type":"boolean"},"id":{"anyOf":[{"description":"The unique ID of the approval response\n","type":"string"},{"type":"null"}]},"reason":{"anyOf":[{"description":"Optional reason for the decision.\n","type":"string"},{"type":"null"}]},"type":{"description":"The type of the item. Always `mcp_approval_response`.\n","enum":["mcp_approval_response"],"type":"string","x-stainless-const":true}},"required":["type","request_id","approve","approval_request_id"],"title":"MCP approval response","type":"object"},"MCPListTools":{"description":"A list of tools available on an MCP server.\n","properties":{"error":{"anyOf":[{"description":"Error message if the server could not list tools.\n","type":"string"},{"type":"null"}]},"id":{"description":"The unique ID of the list.\n","type":"string"},"server_label":{"description":"The label of the MCP server.\n","type":"string"},"tools":{"description":"The tools available on the server.\n","items":{"$ref":"#/components/schemas/MCPListToolsTool"},"type":"array"},"type":{"description":"The type of the item. Always `mcp_list_tools`.\n","enum":["mcp_list_tools"],"type":"string","x-stainless-const":true}},"required":["type","id","server_label","tools"],"title":"MCP list tools","type":"object"},"MCPListToolsTool":{"description":"A tool available on an MCP server.\n","properties":{"annotations":{"anyOf":[{"description":"Additional annotations about the tool.\n","type":"object"},{"type":"null"}]},"description":{"anyOf":[{"description":"The description of the tool.\n","type":"string"},{"type":"null"}]},"input_schema":{"description":"The JSON schema describing the tool's input.\n","type":"object"},"name":{"description":"The name of the tool.\n","type":"string"}},"required":["name","input_schema"],"title":"MCP list tools tool","type":"object"},"MCPTool":{"additionalProperties":true,"description":"Opaque upstream schema placeholder for MCPTool; see overlay x-ohmygpt-opaque-upstream-schemas for rationale.","properties":{"type":{"type":"string"}},"required":["type"],"type":"object","x-ohmygpt-opaque":true,"x-ohmygpt-upstream-ref":"MCPTool"},"MCPToolCall":{"description":"An invocation of a tool on an MCP server.\n","properties":{"approval_request_id":{"anyOf":[{"description":"Unique identifier for the MCP tool call approval request.\nInclude this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.\n","type":"string"},{"type":"null"}]},"arguments":{"description":"A JSON string of the arguments passed to the tool.\n","type":"string"},"error":{"anyOf":[{"description":"The error from the tool call, if any.\n","type":"string"},{"type":"null"}]},"id":{"description":"The unique ID of the tool call.\n","type":"string"},"name":{"description":"The name of the tool that was run.\n","type":"string"},"output":{"anyOf":[{"description":"The output from the tool call.\n","type":"string"},{"type":"null"}]},"server_label":{"description":"The label of the MCP server running the tool.\n","type":"string"},"status":{"$ref":"#/components/schemas/MCPToolCallStatus","description":"The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.\n"},"type":{"description":"The type of the item. Always `mcp_call`.\n","enum":["mcp_call"],"type":"string","x-stainless-const":true}},"required":["type","id","server_label","name","arguments"],"title":"MCP tool call","type":"object"},"MCPToolCallStatus":{"enum":["in_progress","completed","incomplete","calling","failed"],"type":"string"},"MaintenanceRecord":{"properties":{"actual_end_at":{"format":"date-time","type":"string"},"actual_start_at":{"format":"date-time","type":"string"},"affected_components":{"items":{"type":"string"},"type":"array"},"body":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"string"},"scheduled_end_at":{"format":"date-time","type":"string"},"scheduled_start_at":{"format":"date-time","type":"string"},"status":{"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","title","status","affected_components","scheduled_start_at","scheduled_end_at","created_at","updated_at"],"type":"object"},"McpServer":{"description":"A MCPServer is a server that can be called by the model to perform actions.\nIt is a server that implements the MCP protocol.","properties":{"name":{"description":"The name of the MCPServer.","type":"string"},"streamableHttpTransport":{"allOf":[{"$ref":"#/components/schemas/StreamableHttpTransport"}],"description":"A transport that can stream HTTP requests and responses."}},"type":"object"},"MeResponse":{"properties":{"next_recharge_band":{"type":"string"},"next_recharge_rpm":{"type":"integer"},"next_recharge_threshold_cny":{"format":"int64","type":"integer"},"recharge_band":{"type":"string"},"recharge_tiers":{"description":"All recharge tiers, lowest threshold first. A tier applies once recharge_total_cny reaches its threshold_cny.","items":{"properties":{"band":{"type":"string"},"rpm":{"type":"integer"},"threshold_cny":{"format":"int64","type":"integer"}},"required":["band","rpm","threshold_cny"],"type":"object"},"type":"array"},"recharge_total_cny":{"description":"The caller's successful cumulative recharge in CNY, rounded down.","format":"int64","type":"integer"},"rpm":{"type":"integer"},"rpm_overridden":{"description":"True when the RPM is set individually for this account, so recharging does not change it.","type":"boolean"},"user_id":{"format":"int64","type":"integer"}},"required":["user_id","rpm"],"type":"object"},"MemoryTool_20250818":{"additionalProperties":false,"properties":{"allowed_callers":{"items":{"enum":["direct","code_execution_20250825","code_execution_20260120"],"type":"string"},"title":"Allowed Callers","type":"array"},"cache_control":{"anyOf":[{"discriminator":{"mapping":{"ephemeral":"#/components/schemas/CacheControlEphemeral"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/CacheControlEphemeral"}]},{"type":"null"}],"description":"Create a cache control breakpoint at this content block.","title":"Cache Control"},"defer_loading":{"description":"If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.","title":"Defer Loading","type":"boolean"},"input_examples":{"items":{"additionalProperties":{"$ref":"#/components/schemas/JsonValue"},"type":"object"},"title":"Input Examples","type":"array"},"name":{"const":"memory","description":"Name of the tool.\n\nThis is how the tool will be called by the model and in `tool_use` blocks.","title":"Name","type":"string"},"strict":{"description":"When true, guarantees schema validation on tool names and inputs","title":"Strict","type":"boolean"},"type":{"const":"memory_20250818","title":"Type","type":"string"}},"required":["name","type"],"title":"MemoryTool_20250818","type":"object"},"Message":{"examples":[{"content":[{"citations":null,"text":"Hi! My name is Claude.","type":"text"}],"id":"msg_013Zva2CMHLNnXjNJJKqJ2EF","model":"claude-opus-4-6","role":"assistant","stop_reason":"end_turn","stop_sequence":null,"type":"message","usage":{"input_tokens":2095,"output_tokens":503}}],"properties":{"container":{"anyOf":[{"$ref":"#/components/schemas/Container"},{"type":"null"}],"default":null,"description":"Information about the container used in this request.\n\nThis will be non-null if a container tool (e.g. code execution) was used."},"content":{"description":"Content generated by the model.\n\nThis is an array of content blocks, each of which has a `type` that determines its shape.\n\nExample:\n\n```json\n[{\"type\": \"text\", \"text\": \"Hi, I'm Claude.\"}]\n```\n\nIf the request input `messages` ended with an `assistant` turn, then the response `content` will continue directly from that last turn. You can use this to constrain the model's output.\n\nFor example, if the input `messages` were:\n```json\n[\n  {\"role\": \"user\", \"content\": \"What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun\"},\n  {\"role\": \"assistant\", \"content\": \"The best answer is (\"}\n]\n```\n\nThen the response `content` might be:\n\n```json\n[{\"type\": \"text\", \"text\": \"B)\"}]\n```","examples":[[{"citations":null,"text":"Hi! My name is Claude.","type":"text"}]],"items":{"$ref":"#/components/schemas/ContentBlock"},"title":"Content","type":"array"},"id":{"description":"Unique object identifier.\n\nThe format and length of IDs may change over time.","examples":["msg_013Zva2CMHLNnXjNJJKqJ2EF"],"title":"Id","type":"string"},"model":{"$ref":"#/components/schemas/Model"},"role":{"const":"assistant","default":"assistant","description":"Conversational role of the generated message.\n\nThis will always be `\"assistant\"`.","title":"Role","type":"string"},"stop_reason":{"anyOf":[{"$ref":"#/components/schemas/StopReason"},{"type":"null"}],"description":"The reason that we stopped.\n\nThis may be one the following values:\n* `\"end_turn\"`: the model reached a natural stopping point\n* `\"max_tokens\"`: we exceeded the requested `max_tokens` or the model's maximum\n* `\"stop_sequence\"`: one of your provided custom `stop_sequences` was generated\n* `\"tool_use\"`: the model invoked one or more tools\n* `\"pause_turn\"`: we paused a long-running turn. You may provide the response back as-is in a subsequent request to let the model continue.\n* `\"refusal\"`: when streaming classifiers intervene to handle potential policy violations\n\nIn non-streaming mode this value is always non-null. In streaming mode, it is null in the `message_start` event and non-null otherwise.","title":"Stop Reason"},"stop_sequence":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Which custom stop sequence was generated, if any.\n\nThis value will be a non-null string if one of your custom stop sequences was generated.","title":"Stop Sequence"},"type":{"const":"message","default":"message","description":"Object type.\n\nFor Messages, this is always `\"message\"`.","title":"Type","type":"string"},"usage":{"$ref":"#/components/schemas/Usage","description":"Token-count usage and rate-limit accounting.\n\nUnder the hood, the API transforms requests into a format suitable for the model. The model's output then goes through a parsing stage before becoming an API response. As a result, the token counts in `usage` will not match one-to-one with the exact visible content of an API request or response.\n\nFor example, `output_tokens` will be non-zero, even for an empty string response from Claude.\n\nTotal input tokens in a request is the summation of `input_tokens`, `cache_creation_input_tokens`, and `cache_read_input_tokens`.","examples":[{"input_tokens":2095,"output_tokens":503}]}},"required":["id","type","role","content","model","stop_reason","stop_sequence","usage","container"],"title":"Message","type":"object"},"MessagePhase":{"description":"Labels an `assistant` message as intermediate commentary (`commentary`) or the final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when sending follow-up requests, preserve and resend phase on all assistant messages — dropping it can degrade performance. Not used for user messages.\n\nUse `commentary` for an intermediate assistant message and `final_answer` for\nthe final assistant message. For follow-up requests with models like\n`gpt-5.3-codex` and later, preserve and resend phase on all assistant\nmessages. Omitting it can degrade performance. Not used for user messages.\n","enum":["commentary","final_answer"],"type":"string"},"ModalityTokenCount":{"description":"Represents token counting info for a single modality.","properties":{"modality":{"allOf":[{"$ref":"#/components/schemas/GenerativeLanguageModality"}],"description":"The modality associated with this token count."},"tokenCount":{"description":"Number of tokens.","format":"int32","type":"integer"}},"type":"object"},"Model":{"anyOf":[{"type":"string"},{"const":"claude-sonnet-5","description":"High-performance model for coding and agents"},{"const":"claude-fable-5","description":"Next generation of intelligence for the hardest knowledge work and coding problems"},{"const":"claude-mythos-5","description":"Most capable model for cybersecurity and biology research"},{"const":"claude-opus-5","description":"Powerful intelligence for long-running agents and coding"},{"const":"claude-opus-4-8","description":"Powerful intelligence for long-running agents and coding"},{"const":"claude-opus-4-7","description":"Powerful intelligence for long-running agents and coding"},{"const":"claude-mythos-preview","deprecated":true,"description":"New class of intelligence, strongest in coding and cybersecurity"},{"const":"claude-opus-4-6","description":"Powerful intelligence for long-running agents and coding"},{"const":"claude-sonnet-4-6","description":"Best combination of speed and intelligence"},{"const":"claude-haiku-4-5","description":"Fastest model with near-frontier intelligence"},{"const":"claude-haiku-4-5-20251001","description":"Fastest model with near-frontier intelligence"},{"const":"claude-opus-4-5","description":"Powerful intelligence for long-running agents and coding"},{"const":"claude-opus-4-5-20251101","description":"Powerful intelligence for long-running agents and coding"},{"const":"claude-sonnet-4-5","description":"High-performance model for agents and coding"},{"const":"claude-sonnet-4-5-20250929","description":"High-performance model for agents and coding"}],"description":"The model that will complete your prompt.\\n\\nSee [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.","title":"Model"},"ModelArchitecture":{"properties":{"input_modalities":{"items":{"type":"string"},"type":"array"},"modality":{"description":"Human-readable modality flow, e.g. \"text+image->text\".","example":"text+image+file->text","type":"string"},"output_modalities":{"items":{"type":"string"},"type":"array"}},"type":"object"},"ModelAvailabilityResponse":{"properties":{"as_of":{"format":"date-time","type":"string"},"auto":{"allOf":[{"$ref":"#/components/schemas/AvailabilityTrack"}],"description":"Requests that left the provider choice to the gateway."},"model_id":{"type":"string"},"providers":{"description":"Providers with upstream attempts in the 72 hours, sorted by name.","items":{"$ref":"#/components/schemas/ProviderAvailability"},"type":"array"}},"required":["as_of","model_id","auto","providers"],"type":"object"},"ModelHistoricalAutoMetrics":{"description":"Requests for this model that left the provider choice to the gateway, by the result the caller received. The gateway moves a failed request to another provider, so a request succeeds when any provider serves it: these numbers are not an average of the providers and cannot be derived from them. Requests that named a provider are not included.\n","properties":{"avg_latency_ms":{"description":"Mean latency of successful requests; null until at least 30 requests succeeded.","format":"int64","nullable":true,"type":"integer"},"effective_pricing":{"$ref":"#/components/schemas/ModelHistoricalEffectivePricing"},"structured_output_error_rate":{"description":"Null until at least 20 requests asked for structured output.","nullable":true,"type":"number"},"tool_call_error_rate":{"description":"Null until at least 20 requests asked for tool calls.","nullable":true,"type":"number"},"uptime_pct":{"description":"Share (%) of requests that got a result, counted the same way as /v1/status/uptime?group_by=model (caller errors do not count). Null until there are at least 20 requests.","nullable":true,"type":"number"}},"required":["uptime_pct","avg_latency_ms","tool_call_error_rate","structured_output_error_rate"],"type":"object"},"ModelHistoricalAutoStats":{"allOf":[{"$ref":"#/components/schemas/ModelHistoricalPerformance"},{"$ref":"#/components/schemas/ModelHistoricalAutoMetrics"}]},"ModelHistoricalEffectivePricing":{"description":"Omitted until the scope has at least 30 samples charged on a platform key.","properties":{"cache_hit_rate":{"description":"Share of input tokens read from the prompt cache, `cache_read_tokens / (uncached input tokens + cache_read_tokens)`; cache writes do not count as hits. Null when this model has no cached-input price or served no input; 0 means no input hit the cache.","nullable":true,"type":"number"},"credits_per_million_tokens":{"description":"Charged Credits per million tokens, counting every token billed (new input, cache reads and writes, output).","type":"number"},"discount_pct":{"description":"Percentage saved against the official list price, (1 - charged / list) × 100, over the requests that recorded a list price. Negative when the charged price is above the list price; null until at least 30 requests recorded a list price.","nullable":true,"type":"number"},"list_credits_per_million_tokens":{"description":"The weighted charged price converted back to the official list price, in Credits per million tokens, so credits_per_million_tokens / list_credits_per_million_tokens = 1 - discount_pct / 100. The conversion ratio comes from requests that recorded a list price (older requests and bring-your-own-key requests do not); null until at least 30 did, or when those requests were free.","nullable":true,"type":"number"}},"required":["credits_per_million_tokens","cache_hit_rate","list_credits_per_million_tokens","discount_pct"],"type":"object"},"ModelHistoricalPercentiles":{"description":"Percentiles over the samples in the window. The containing field is null until there are at least 30 samples.","properties":{"p50":{"type":"number"},"p75":{"type":"number"},"p90":{"type":"number"},"p95":{"type":"number"},"p99":{"type":"number"}},"required":["p50","p75","p90","p95","p99"],"type":"object"},"ModelHistoricalPerformance":{"properties":{"latency_ms":{"allOf":[{"$ref":"#/components/schemas/ModelHistoricalPercentiles"}],"description":"Total latency in milliseconds of successful samples. For `auto` a sample is a request, timed from when it arrived, including time spent on providers that failed before another one served it; for a provider it is one upstream attempt, timed from when that attempt was sent. Null until at least 30 samples succeeded.","nullable":true},"throughput_tokens_per_second":{"allOf":[{"$ref":"#/components/schemas/ModelHistoricalPercentiles"}],"description":"Output speed of successful streamed samples, as completion tokens per second after the first token. pN is the speed that N% of samples reached or exceeded (OpenRouter's convention), so p90 is lower than p50. Null until there are at least 30 such samples.","nullable":true},"ttft_ms":{"allOf":[{"$ref":"#/components/schemas/ModelHistoricalPercentiles"}],"description":"Time to first token in milliseconds of successful samples, on the same clock as `latency_ms`. Null until at least 30 successful samples recorded a first token.","nullable":true}},"required":["latency_ms","ttft_ms","throughput_tokens_per_second"],"type":"object"},"ModelHistoricalProviderMetrics":{"description":"One provider that received attempts for the model in the window, busiest first. Every upstream attempt sent to the provider is a sample, including attempts that failed and were then served by another provider.\n","properties":{"avg_latency_ms":{"description":"Mean latency of successful attempts; null until at least 30 attempts succeeded.","format":"int64","nullable":true,"type":"integer"},"effective_pricing":{"$ref":"#/components/schemas/ModelHistoricalEffectivePricing"},"provider":{"type":"string"},"structured_output_error_rate":{"description":"Share of successful responses to requests that asked for JSON whose final text isn't valid JSON. Null until at least 20 such responses.","nullable":true,"type":"number"},"token_share":{"description":"This provider's share (0–1) of the prompt plus completion tokens charged across all providers of the model in the window, rounded to whole percentage points (0.01 steps; below 0.005 is 0); null until all providers together have at least 20 charged samples, or when none served tokens.","nullable":true,"type":"number"},"tool_call_error_rate":{"description":"Share of successful responses to requests that offered tools whose tool calls a client can't use (arguments that aren't a JSON object, a tool the request didn't offer, or a tool-call finish with no call). Null until at least 20 such responses.","nullable":true,"type":"number"},"uptime_daily":{"description":"One entry per UTC day of the window including today; empty when the provider had no counted samples for this model.","items":{"$ref":"#/components/schemas/UptimeDay"},"type":"array"},"uptime_pct":{"description":"Share (%) of this provider's attempts that succeeded, over the UTC days of the window including today, counted the same way as /v1/status/uptime?group_by=provider (caller errors and 429 do not count). This is the provider's success rate. Null until there are at least 20 samples.","nullable":true,"type":"number"}},"required":["provider","token_share","uptime_pct","uptime_daily","avg_latency_ms","tool_call_error_rate","structured_output_error_rate"],"type":"object"},"ModelHistoricalProviderStats":{"allOf":[{"$ref":"#/components/schemas/ModelHistoricalPerformance"},{"$ref":"#/components/schemas/ModelHistoricalProviderMetrics"}]},"ModelHistoricalStatsResponse":{"properties":{"auto":{"$ref":"#/components/schemas/ModelHistoricalAutoStats"},"model_id":{"type":"string"},"period":{"enum":["7d","30d","90d"],"type":"string"},"providers":{"items":{"$ref":"#/components/schemas/ModelHistoricalProviderStats"},"type":"array"}},"required":["model_id","period","auto","providers"],"type":"object"},"ModelIdsResponses":{"anyOf":[{"$ref":"#/components/schemas/ModelIdsShared"},{"enum":["o1-pro","o1-pro-2025-03-19","o3-pro","o3-pro-2025-06-10","o3-deep-research","o3-deep-research-2025-06-26","o4-mini-deep-research","o4-mini-deep-research-2025-06-26","computer-use-preview","computer-use-preview-2025-03-11","gpt-5-codex","gpt-5-pro","gpt-5-pro-2025-10-06","gpt-5.1-codex-max"],"title":"ResponsesOnlyModel","type":"string"}],"example":"gpt-5.1"},"ModelIdsShared":{"anyOf":[{"type":"string"},{"enum":["gpt-5.2","gpt-5.2-2025-12-11","gpt-5.2-chat-latest","gpt-5.2-pro","gpt-5.2-pro-2025-12-11","gpt-5.1","gpt-5.1-2025-11-13","gpt-5.1-codex","gpt-5.1-mini","gpt-5.1-chat-latest","gpt-5","gpt-5-mini","gpt-5-nano","gpt-5-2025-08-07","gpt-5-mini-2025-08-07","gpt-5-nano-2025-08-07","gpt-5-chat-latest","gpt-4.1","gpt-4.1-mini","gpt-4.1-nano","gpt-4.1-2025-04-14","gpt-4.1-mini-2025-04-14","gpt-4.1-nano-2025-04-14","o4-mini","o4-mini-2025-04-16","o3","o3-2025-04-16","o3-mini","o3-mini-2025-01-31","o1","o1-2024-12-17","o1-preview","o1-preview-2024-09-12","o1-mini","o1-mini-2024-09-12","gpt-4o","gpt-4o-2024-11-20","gpt-4o-2024-08-06","gpt-4o-2024-05-13","gpt-4o-audio-preview","gpt-4o-audio-preview-2024-10-01","gpt-4o-audio-preview-2024-12-17","gpt-4o-audio-preview-2025-06-03","gpt-4o-mini-audio-preview","gpt-4o-mini-audio-preview-2024-12-17","gpt-4o-search-preview","gpt-4o-mini-search-preview","gpt-4o-search-preview-2025-03-11","gpt-4o-mini-search-preview-2025-03-11","chatgpt-4o-latest","codex-mini-latest","gpt-4o-mini","gpt-4o-mini-2024-07-18","gpt-4-turbo","gpt-4-turbo-2024-04-09","gpt-4-0125-preview","gpt-4-turbo-preview","gpt-4-1106-preview","gpt-4-vision-preview","gpt-4","gpt-4-0314","gpt-4-0613","gpt-4-32k","gpt-4-32k-0314","gpt-4-32k-0613","gpt-3.5-turbo","gpt-3.5-turbo-16k","gpt-3.5-turbo-0301","gpt-3.5-turbo-0613","gpt-3.5-turbo-1106","gpt-3.5-turbo-0125","gpt-3.5-turbo-16k-0613"],"type":"string"}],"example":"gpt-4o"},"ModelLifecycle":{"properties":{"deprecated_at":{"type":"string"},"listed_at":{"description":"The date this platform started offering the model, as YYYY-MM-DD. Present only when that was later than the model's release (`created`); otherwise the model was offered from its release date.","example":"2026-11-10","type":"string"},"status":{"type":"string"},"successor":{"type":"string"},"sunset_at":{"type":"string"}},"type":"object"},"ModelLimits":{"description":"Public /v1/models limits projection. max_prompt_tokens and max_completion_tokens are directional limits.","properties":{"max_completion_tokens":{"type":"integer"},"max_prompt_tokens":{"type":"integer"},"video":{"description":"Limits of a video generation model.","properties":{"max_content_bytes":{"description":"The largest video `GET /v1/videos/{id}/content` returns, in bytes.","type":"integer"},"seconds":{"description":"The `seconds` values `POST /v1/videos` accepts; the first is the default.","items":{"type":"integer"},"type":"array"}},"type":"object"}},"type":"object"},"ModelModalities":{"properties":{"input":{"items":{"type":"string"},"type":"array"},"output":{"items":{"type":"string"},"type":"array"}},"type":"object"},"ModelProtocol":{"properties":{"id":{"example":"openai-completions","type":"string"},"label":{"example":"OpenAI Chat","type":"string"},"method":{"description":"HTTP method used to open this endpoint.","enum":["GET","POST"],"example":"POST","type":"string"},"model":{"description":"Request model value to use with this protocol. Usually the canonical Model.ID; SDK-native protocols may use their native model name.","example":"openai/gpt-4o","type":"string"},"native":{"description":"True when at least one provider speaks this protocol itself, so the request is passed through unchanged; otherwise the gateway translates it into a protocol the provider supports.","type":"boolean"},"path":{"example":"/v1/chat/completions","type":"string"},"transport":{"description":"Transport used by this endpoint.","enum":["http","websocket"],"example":"http","type":"string"}},"required":["id","label","path","method","transport"],"type":"object"},"ModelProvider":{"properties":{"context":{"type":"integer"},"data_policy":{"$ref":"#/components/schemas/DataPolicy"},"display_name":{"type":"string"},"location":{"type":"string"},"max_completion_tokens":{"type":"integer"},"max_prompt_tokens":{"type":"integer"},"pricing":{"$ref":"#/components/schemas/PublicPricingConfig"},"provider":{"type":"string"},"quantization":{"type":"string"},"supports_implicit_caching":{"type":"boolean"}},"required":["provider"],"type":"object"},"ModelRankingItem":{"properties":{"model":{"description":"Canonical model ID.","type":"string"},"p50_ttft_ms":{"description":"Median time to first token of successful requests in milliseconds; null until at least 100 successful requests recorded a first token.","format":"int64","nullable":true,"type":"integer"},"rank":{"description":"Position by prompt plus completion tokens served in the window, 1 for the most; models with equal tokens are ordered by model ID, so no two models share a rank.","minimum":1,"type":"integer"},"success_rate":{"description":"Share of successful requests (0–1); null until there are at least 100 samples.","nullable":true,"type":"number"},"token_share":{"description":"Share (0–1) of the prompt plus completion tokens served to all ranked models in the window, rounded to whole percentage points (0.01 steps). A model below 0.005 shows 0 but keeps its rank; 0 also when the ranked models served no tokens.","maximum":1,"minimum":0,"type":"number"}},"required":["model","rank","token_share","success_rate","p50_ttft_ms"],"type":"object"},"ModelRankingsResponse":{"properties":{"data":{"description":"One item per public model with traffic in the window, sorted by rank.","items":{"$ref":"#/components/schemas/ModelRankingItem"},"type":"array"},"period_days":{"description":"Length of the measurement window in days.","type":"integer"}},"required":["period_days","data"],"type":"object"},"ModelRequestContact":{"properties":{"email":{"description":"Optional. Where to say when the model can be called.","format":"email","maxLength":254,"type":"string"},"locale":{"example":"en-US","type":"string"},"message":{"maxLength":1000,"type":"string"},"model":{"description":"A model ID from the catalog, or the name of a model the catalog does not list.","example":"mistral/mistral-large-3","maxLength":120,"type":"string"},"topic":{"enum":["model_request"],"type":"string"}},"required":["topic","model"],"type":"object"},"ModelResponse":{"properties":{"api":{"description":"Native API type of the model","example":"openai-completions","type":"string"},"architecture":{"$ref":"#/components/schemas/ModelArchitecture"},"available":{"description":"Whether the platform currently offers this model. When false, every request to it fails. `/v1/models` lists such a model only with `include_unavailable=true`; it can also be retrieved by ID.","type":"boolean"},"capability":{"$ref":"#/components/schemas/CapabilityIndex"},"context_length":{"type":"integer"},"created":{"type":"integer"},"description":{"type":"string"},"fidelity":{"$ref":"#/components/schemas/FidelityMatrix"},"id":{"example":"openai/gpt-4o","type":"string"},"knowledge_cutoff":{"type":"string"},"lifecycle":{"$ref":"#/components/schemas/ModelLifecycle"},"limits":{"$ref":"#/components/schemas/ModelLimits"},"managed_routing":{"description":"The platform schedules this model across its providers under a routing contract. A provider named in the model string or in provider routing options is not honored; each request is charged at the price of the provider that serves it. Omitted when the caller can choose the provider.","type":"boolean"},"modalities":{"$ref":"#/components/schemas/ModelModalities"},"name":{"type":"string"},"object":{"enum":["model"],"type":"string"},"owned_by":{"example":"openai","type":"string"},"preference":{"$ref":"#/components/schemas/PreferenceRating"},"pricing":{"$ref":"#/components/schemas/PublicPricingConfig"},"protocols":{"description":"Protocol endpoints this model can be called through. Lists what the catalog supports, not whether a given key, account or provider filter can call it right now.","items":{"$ref":"#/components/schemas/ModelProtocol"},"type":"array"},"providers":{"description":"Static hosting providers available for this model.","items":{"$ref":"#/components/schemas/ModelProvider"},"type":"array"},"service":{"description":"Product type of the model (llm, embedding, image, video, tts, stt, rerank, ocr, …), the same value the `service` filter matches.","example":"llm","type":"string"}},"required":["id","object","created","owned_by","available","service"],"type":"object"},"ModelResponseProperties":{"properties":{"metadata":{"$ref":"#/components/schemas/ChatMetadata"},"prompt_cache_key":{"description":"Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching).\n","example":"prompt-cache-key-1234","type":"string"},"prompt_cache_retention":{"anyOf":[{"description":"The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).\n","enum":["in-memory","24h"],"type":"string"},{"type":"null"}]},"safety_identifier":{"description":"A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.\nThe IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).\n","example":"safety-identifier-1234","maxLength":64,"type":"string"},"service_tier":{"$ref":"#/components/schemas/ServiceTier"},"temperature":{"anyOf":[{"default":1,"description":"What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\nWe generally recommend altering this or `top_p` but not both.\n","example":1,"maximum":2,"minimum":0,"type":"number"},{"type":"null"}]},"top_logprobs":{"anyOf":[{"description":"An integer between 0 and 20 specifying the number of most likely tokens to\nreturn at each token position, each with an associated log probability.\n","maximum":20,"minimum":0,"type":"integer"},{"type":"null"}]},"top_p":{"anyOf":[{"default":1,"description":"An alternative to sampling with temperature, called nucleus sampling,\nwhere the model considers the results of the tokens with top_p probability\nmass. So 0.1 means only the tokens comprising the top 10% probability mass\nare considered.\n\nWe generally recommend altering this or `temperature` but not both.\n","example":1,"maximum":1,"minimum":0,"type":"number"},{"type":"null"}]},"user":{"deprecated":true,"description":"This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations.\nA stable identifier for your end-users.\nUsed to boost cache hit rates by better bucketing similar requests and  to help OpenAI detect and prevent abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).\n","example":"user-1234","type":"string"}},"type":"object"},"ModelRouteDetailEnvelope":{"properties":{"code":{"type":"integer"},"data":{"$ref":"#/components/schemas/ModelRouteDetailResponse"},"message":{"type":"string"},"success":{"type":"boolean"}},"required":["success","code","message","data"],"type":"object"},"ModelRouteDetailResponse":{"properties":{"bucket":{"type":"string"},"model":{"type":"string"},"routes":{"items":{"$ref":"#/components/schemas/RouteTimeSeriesGroup"},"type":"array"},"updated_at":{"format":"date-time","type":"string"}},"required":["model","bucket","routes","updated_at"],"type":"object"},"ModelStage":{"enum":["MODEL_STAGE_UNSPECIFIED","UNSTABLE_EXPERIMENTAL","EXPERIMENTAL","PREVIEW","STABLE","LEGACY","DEPRECATED","RETIRED"],"type":"string"},"ModelStatus":{"description":"The status of the underlying model. This is used to indicate the stage of the\nunderlying model and the retirement time if applicable.","properties":{"message":{"description":"A message explaining the model status.","type":"string"},"modelStage":{"allOf":[{"$ref":"#/components/schemas/ModelStage"}],"description":"The stage of the underlying model."},"retirementTime":{"description":"The time at which the model will be retired.","format":"date-time","type":"string"}},"type":"object"},"ModelsListResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ModelResponse"},"type":"array"},"object":{"enum":["list"],"type":"string"}},"required":["object","data"],"type":"object"},"MoveParam":{"additionalProperties":true,"description":"Opaque upstream schema placeholder for MoveParam; see overlay x-ohmygpt-opaque-upstream-schemas for rationale.","properties":{"type":{"type":"string"}},"required":["type"],"type":"object","x-ohmygpt-opaque":true,"x-ohmygpt-upstream-ref":"MoveParam"},"MultiSpeakerVoiceConfig":{"description":"The configuration for the multi-speaker setup.","type":"object","x-upstream-stub":true},"OcrRequest":{"additionalProperties":true,"description":"Send `file` or `document`, whichever the model reads; other fields are passed to the model unchanged.","properties":{"document":{"additionalProperties":true,"description":"The document input, such as `{\"type\": \"document_url\", \"document_url\": \"https://…\"}` (Mistral OCR)","type":"object"},"file":{"description":"The document or image as a URL or base64 data (Zhipu GLM-OCR)","type":"string"},"model":{"description":"An OCR model ID from `GET /v1/models`","type":"string"}},"required":["model"],"type":"object"},"OpenAIError":{"properties":{"error":{"properties":{"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"},"type":{"type":"string"}},"type":"object"}},"type":"object"},"OpenRouterEndpoint":{"properties":{"context_length":{"type":"integer"},"latency_last_30m":{"allOf":[{"$ref":"#/components/schemas/OpenRouterPercentileStats"}],"description":"Time to first token of successful requests on this endpoint over the last 30 minutes, in milliseconds. Null until there are at least 30 such requests.","nullable":true},"max_completion_tokens":{"type":"integer"},"max_prompt_tokens":{"nullable":true,"type":"integer"},"model_id":{"type":"string"},"model_name":{"type":"string"},"name":{"type":"string"},"pricing":{"$ref":"#/components/schemas/OpenRouterEndpointPricing"},"provider_name":{"type":"string"},"quantization":{"type":"string"},"status":{"description":"0 when the endpoint can serve requests, -10 when it currently cannot.","type":"integer"},"supports_implicit_caching":{"type":"boolean"},"tag":{"type":"string"},"throughput_last_30m":{"allOf":[{"$ref":"#/components/schemas/OpenRouterPercentileStats"}],"description":"Output speed of successful streamed requests on this endpoint over the last 30 minutes, in completion tokens per second after the first token. pN is the speed that N% of requests reached or exceeded, so p90 is lower than p50. Null until there are at least 30 such requests.","nullable":true},"uptime_last_1d":{"description":"Uptime percentage over the last 1440 one-minute buckets: the share of minutes in which at least 80% of the endpoint's attempts succeeded, counting only minutes with 10 or more attempts. Rate-limited (429) and caller-caused (400, 413, 422) responses are not attempts. Null until the counted minutes hold at least 20 attempts.\n","nullable":true,"type":"number"},"uptime_last_30m":{"description":"Uptime percentage over the last 30 one-minute buckets; see uptime_last_1d.","nullable":true,"type":"number"},"uptime_last_5m":{"description":"Uptime percentage over the last 5 one-minute buckets; see uptime_last_1d.","nullable":true,"type":"number"}},"required":["name","model_id","model_name","context_length","pricing","provider_name","tag","quantization","max_completion_tokens","max_prompt_tokens","status","uptime_last_30m","uptime_last_5m","uptime_last_1d","supports_implicit_caching","latency_last_30m","throughput_last_30m"],"type":"object"},"OpenRouterEndpointPricing":{"properties":{"completion":{"type":"string"},"image":{"type":"string"},"input_cache_read":{"type":"string"},"input_cache_write":{"type":"string"},"internal_reasoning":{"type":"string"},"prompt":{"type":"string"},"web_search":{"type":"string"}},"required":["prompt","completion"],"type":"object"},"OpenRouterEndpointsModel":{"properties":{"endpoints":{"items":{"$ref":"#/components/schemas/OpenRouterEndpoint"},"type":"array"},"id":{"type":"string"}},"required":["id","endpoints"],"type":"object"},"OpenRouterEndpointsResponse":{"properties":{"data":{"$ref":"#/components/schemas/OpenRouterEndpointsModel"}},"required":["data"],"type":"object"},"OpenRouterPercentileStats":{"description":"OpenRouter's PercentileStats, plus p95.","properties":{"p50":{"type":"number"},"p75":{"type":"number"},"p90":{"type":"number"},"p95":{"type":"number"},"p99":{"type":"number"}},"required":["p50","p75","p90","p95","p99"],"type":"object"},"OutputConfig":{"additionalProperties":false,"properties":{"effort":{"anyOf":[{"$ref":"#/components/schemas/EffortLevel"},{"type":"null"}],"description":"How much effort the model should put into its response. Higher effort levels may result in more thorough analysis but take longer.\n\nValid values are `low`, `medium`, `high`, or `max`."},"format":{"anyOf":[{"$ref":"#/components/schemas/JsonOutputFormat"},{"type":"null"}],"description":"A schema to specify Claude's output format in responses. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs)"}},"title":"OutputConfig","type":"object"},"OutputContent":{"discriminator":{"mapping":{"output_text":"#/components/schemas/OutputTextContent","reasoning_text":"#/components/schemas/ReasoningTextContent","refusal":"#/components/schemas/RefusalContent"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/OutputTextContent"},{"$ref":"#/components/schemas/RefusalContent"},{"$ref":"#/components/schemas/ReasoningTextContent"}]},"OutputItem":{"anyOf":[{"$ref":"#/components/schemas/OutputMessage"},{"$ref":"#/components/schemas/FileSearchToolCall"},{"$ref":"#/components/schemas/FunctionToolCall"},{"$ref":"#/components/schemas/WebSearchToolCall"},{"$ref":"#/components/schemas/ComputerToolCall"},{"$ref":"#/components/schemas/ReasoningItem"},{"$ref":"#/components/schemas/CompactionBody"},{"$ref":"#/components/schemas/ImageGenToolCall"},{"$ref":"#/components/schemas/CodeInterpreterToolCall"},{"$ref":"#/components/schemas/LocalShellToolCall"},{"$ref":"#/components/schemas/FunctionShellCall"},{"$ref":"#/components/schemas/FunctionShellCallOutput"},{"$ref":"#/components/schemas/ApplyPatchToolCall"},{"$ref":"#/components/schemas/ApplyPatchToolCallOutput"},{"$ref":"#/components/schemas/MCPToolCall"},{"$ref":"#/components/schemas/MCPListTools"},{"$ref":"#/components/schemas/MCPApprovalRequest"},{"$ref":"#/components/schemas/CustomToolCall"}],"discriminator":{"mapping":{"apply_patch_call":"#/components/schemas/ApplyPatchToolCall","apply_patch_call_output":"#/components/schemas/ApplyPatchToolCallOutput","code_interpreter_call":"#/components/schemas/CodeInterpreterToolCall","compaction":"#/components/schemas/CompactionBody","computer_call":"#/components/schemas/ComputerToolCall","custom_tool_call":"#/components/schemas/CustomToolCall","file_search_call":"#/components/schemas/FileSearchToolCall","function_call":"#/components/schemas/FunctionToolCall","image_generation_call":"#/components/schemas/ImageGenToolCall","local_shell_call":"#/components/schemas/LocalShellToolCall","mcp_approval_request":"#/components/schemas/MCPApprovalRequest","mcp_call":"#/components/schemas/MCPToolCall","mcp_list_tools":"#/components/schemas/MCPListTools","message":"#/components/schemas/OutputMessage","reasoning":"#/components/schemas/ReasoningItem","shell_call":"#/components/schemas/FunctionShellCall","shell_call_output":"#/components/schemas/FunctionShellCallOutput","web_search_call":"#/components/schemas/WebSearchToolCall"},"propertyName":"type"}},"OutputMessage":{"description":"An output message from the model.\n","properties":{"content":{"description":"The content of the output message.\n","items":{"$ref":"#/components/schemas/OutputMessageContent"},"type":"array"},"id":{"description":"The unique ID of the output message.\n","type":"string"},"phase":{"anyOf":[{"$ref":"#/components/schemas/MessagePhase"},{"type":"null"}]},"role":{"description":"The role of the output message. Always `assistant`.\n","enum":["assistant"],"type":"string","x-stainless-const":true},"status":{"description":"The status of the message input. One of `in_progress`, `completed`, or\n`incomplete`. Populated when input items are returned via API.\n","enum":["in_progress","completed","incomplete"],"type":"string"},"type":{"description":"The type of the output message. Always `message`.\n","enum":["message"],"type":"string","x-stainless-const":true}},"required":["id","type","role","content","status"],"title":"Output message","type":"object"},"OutputMessageContent":{"discriminator":{"mapping":{"output_text":"#/components/schemas/OutputTextContent","refusal":"#/components/schemas/RefusalContent"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/OutputTextContent"},{"$ref":"#/components/schemas/RefusalContent"}]},"OutputTextContent":{"description":"A text output from the model.","properties":{"annotations":{"description":"The annotations of the text output.","items":{"$ref":"#/components/schemas/Annotation"},"type":"array"},"logprobs":{"items":{"$ref":"#/components/schemas/LogProb"},"type":"array"},"text":{"description":"The text output from the model.","type":"string"},"type":{"default":"output_text","description":"The type of the output text. Always `output_text`.","enum":["output_text"],"type":"string","x-stainless-const":true}},"required":["type","text","annotations","logprobs"],"title":"Output text","type":"object"},"PageStatus":{"description":"no_data means fewer than 20 requests reached the provider in the last 24 hours, too few to call it operational or degraded (the page status is no_data when every provider is); unknown means the status could not be read or is out of date.","enum":["unknown","no_data","maintenance","operational","degraded_performance","major_outage"],"type":"string"},"ParallelToolCalls":{"default":true,"description":"Whether to enable [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) during tool use.","type":"boolean"},"Part":{"description":"A datatype containing media that is part of a multi-part `Content` message.\n\nA `Part` consists of data which has an associated datatype. A `Part` can only\ncontain one of the accepted types in `Part.data`.\n\nA `Part` must have a fixed IANA MIME type identifying the type and subtype\nof the media if the `inline_data` field is filled with raw bytes.","properties":{"audioTranscription":{"allOf":[{"$ref":"#/components/schemas/AudioTranscription"}],"description":"Optional. Audio (input or output) transcription.\nThis is only set when this Part contains audio data."},"codeExecutionResult":{"allOf":[{"$ref":"#/components/schemas/CodeExecutionResult"}],"description":"Result of executing the `ExecutableCode`."},"executableCode":{"allOf":[{"$ref":"#/components/schemas/ExecutableCode"}],"description":"Code generated by the model that is meant to be executed."},"fileData":{"allOf":[{"$ref":"#/components/schemas/FileData"}],"description":"URI based data."},"functionCall":{"allOf":[{"$ref":"#/components/schemas/FunctionCall"}],"description":"A predicted `FunctionCall` returned from the model that contains\na string representing the `FunctionDeclaration.name` with the\narguments and their values."},"functionResponse":{"allOf":[{"$ref":"#/components/schemas/FunctionResponse"}],"description":"The result output of a `FunctionCall` that contains a string\nrepresenting the `FunctionDeclaration.name` and a structured JSON\nobject containing any output from the function is used as context to\nthe model."},"inlineData":{"allOf":[{"$ref":"#/components/schemas/Blob"}],"description":"Inline media bytes."},"mediaProcessing":{"description":"Optional. How the model processes this part's media for understanding.\nOnly meaningful for video parts (`inline_data` or `file_data` with video\nmime). Non-video parts ignore this field.","enum":["MEDIA_PROCESSING_UNSPECIFIED","STATIC","AGENTIC"],"type":"string"},"mediaResolution":{"allOf":[{"$ref":"#/components/schemas/V1mainMediaResolution"}],"description":"Optional. Media resolution for the input media."},"partMetadata":{"additionalProperties":{"description":"Properties of the object."},"description":"Custom metadata associated with the Part.\nAgents using genai.Part as content representation may need to keep track\nof the additional information. For example it can be name of a file/source\nfrom which the Part originates or a way to multiplex multiple Part streams.","type":"object"},"speechMetadata":{"allOf":[{"$ref":"#/components/schemas/SpeechMetadata"}],"description":"Optional. Metadata applied to text parts to customize how they should be spoken or\nsynthesized, such as specifying speaker identity or speaking style."},"text":{"description":"Inline text.","type":"string"},"thought":{"description":"Optional. Indicates if the part is thought from the model.","type":"boolean"},"thoughtSignature":{"description":"Optional. An opaque signature for the thought so it can be reused in subsequent\nrequests.","format":"byte","type":"string"},"toolCall":{"allOf":[{"$ref":"#/components/schemas/ToolCall"}],"description":"Server-side tool call. This field is populated when the model\npredicts a tool invocation that should be executed on the server.\nThe client is expected to echo this message back to the API."},"toolResponse":{"allOf":[{"$ref":"#/components/schemas/ToolResponse"}],"description":"The output from a server-side `ToolCall` execution. This field is\npopulated by the client with the results of executing the\ncorresponding `ToolCall`."},"videoMetadata":{"allOf":[{"$ref":"#/components/schemas/VideoMetadata"}],"description":"Optional. Video metadata. The metadata should only be specified while the video\ndata is presented in inline_data or file_data."}},"type":"object"},"PartialImages":{"anyOf":[{"default":0,"description":"The number of partial images to generate. This parameter is used for\nstreaming responses that return partial images. Value must be between 0 and 3.\nWhen set to 0, the response will be a single image sent in one streaming event.\n\nNote that the final image may be sent before the full number of partial images\nare generated if the full image is generated more quickly.\n","example":1,"maximum":3,"minimum":0,"type":"integer"},{"type":"null"}]},"PrebuiltVoiceConfig":{"description":"The configuration for the prebuilt speaker to use.","properties":{"voiceName":{"description":"Optional. The name of the preset voice to use.","type":"string"}},"type":"object"},"PredictionContent":{"description":"Static predicted output content, such as the content of a text file that is\nbeing regenerated.\n","properties":{"content":{"description":"The content that should be matched when generating a model response.\nIf generated tokens would match this content, the entire model response\ncan be returned much more quickly.\n","oneOf":[{"description":"The content used for a Predicted Output. This is often the\ntext of a file you are regenerating with minor changes.\n","title":"Text content","type":"string"},{"description":"An array of content parts with a defined type. Supported options differ based on the [model](https://platform.openai.com/docs/models) being used to generate the response. Can contain text inputs.","items":{"$ref":"#/components/schemas/ChatCompletionRequestMessageContentPartText"},"minItems":1,"title":"Array of content parts","type":"array"}]},"type":{"description":"The type of the predicted content you want to provide. This type is\ncurrently always `content`.\n","enum":["content"],"type":"string","x-stainless-const":true}},"required":["type","content"],"title":"Static Content","type":"object"},"PreferenceRating":{"description":"Human-preference rating from LMArena's Text Arena leaderboard (lmarena-ai/leaderboard-dataset, CC BY 4.0): an Elo-scale rating from blind pairwise votes on the overall text category. Credit LMArena wherever the rating is shown. It measures which answers people prefer, on a different scale from capability; do not merge, average or convert between the two. Where the leaderboard lists a model once per reasoning effort, the entry without an effort suffix is used, otherwise the effort with the most votes. Omitted when the leaderboard does not cover the model.","properties":{"as_of":{"description":"Publish date of the leaderboard the rating comes from (YYYY-MM-DD).","type":"string"},"rating":{"type":"number"},"rating_lower":{"description":"Lower bound of the rating's confidence interval.","type":"number"},"rating_upper":{"description":"Upper bound of the rating's confidence interval.","type":"number"},"votes":{"description":"Votes behind the rating.","format":"int64","type":"integer"}},"required":["rating","rating_lower","rating_upper","votes","as_of"],"type":"object"},"Prompt":{"anyOf":[{"description":"Reference to a prompt template and its variables.\n[Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts).\n","properties":{"id":{"description":"The unique identifier of the prompt template to use.","type":"string"},"variables":{"$ref":"#/components/schemas/ResponsePromptVariables"},"version":{"anyOf":[{"description":"Optional version of the prompt template.","type":"string"},{"type":"null"}]}},"required":["id"],"type":"object"},{"type":"null"}]},"PromptFeedback":{"description":"A set of the feedback metadata the prompt specified in\n`GenerateContentRequest.content`.","properties":{"blockReason":{"description":"Optional. If set, the prompt was blocked and no candidates are returned.\nRephrase the prompt.","enum":["BLOCK_REASON_UNSPECIFIED","SAFETY","OTHER","BLOCKLIST","PROHIBITED_CONTENT","IMAGE_SAFETY"],"type":"string"},"safetyRatings":{"description":"Ratings for safety of the prompt.\nThere is at most one rating per category.","items":{"$ref":"#/components/schemas/SafetyRating"},"type":"array"}},"type":"object"},"ProviderAvailability":{"allOf":[{"$ref":"#/components/schemas/AvailabilityTrack"},{"properties":{"provider":{"type":"string"}},"required":["provider"],"type":"object"}]},"PublicDateRange":{"properties":{"end":{"description":"UTC instant, exclusive.","format":"date-time","type":"string"},"start":{"description":"UTC instant, inclusive.","format":"date-time","type":"string"}},"required":["start","end"],"type":"object"},"PublicPricingCondition":{"properties":{"exclude_ranges":{"description":"UTC half-open ranges [start, end) where this rule does NOT apply, e.g. China statutory holidays excluded from peak pricing. A matched instant is vetoed even when time_windows matches; the fallback rule prices it instead.","items":{"$ref":"#/components/schemas/PublicDateRange"},"type":"array"},"max_input":{"format":"int64","type":"integer"},"min_input":{"format":"int64","type":"integer"},"params":{"additionalProperties":{"type":"string"},"type":"object"},"service_tier":{"type":"string"},"time_windows":{"items":{"$ref":"#/components/schemas/PublicTimeWindow"},"type":"array"},"usage_kind":{"allOf":[{"$ref":"#/components/schemas/UsageKind"}],"description":"When set, the rule prices only usage of this kind, e.g. gpt-6-luna has separate Decisions prices next to its chat prices. Rules without usage_kind price the remaining usage."},"valid_from":{"format":"date-time","type":"string"},"valid_until":{"format":"date-time","type":"string"},"weekdays":{"description":"Weekdays (Beijing time, UTC+8) this rule applies on, e.g. DeepSeek peak pricing only falls on workdays. Empty means every day.","items":{"enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"],"type":"string"},"type":"array"}},"type":"object"},"PublicPricingConfig":{"description":"Public catalog pricing shown in Credits. price_credits is the selling price; list_price_credits is the provider's list price, omitted when the two are equal.","properties":{"flat":{"items":{"$ref":"#/components/schemas/PublicPricingItem"},"type":"array"},"mode":{"type":"string"},"rules":{"items":{"$ref":"#/components/schemas/PublicPricingRule"},"type":"array"},"tiered":{"items":{"$ref":"#/components/schemas/PublicPricingTier"},"type":"array"},"variants":{"items":{"$ref":"#/components/schemas/PublicPricingVariant"},"type":"array"}},"type":"object"},"PublicPricingItem":{"properties":{"kind":{"type":"string"},"list_price_credits":{"description":"Provider's list price; omitted when it equals price_credits.","format":"int64","type":"integer"},"params":{"additionalProperties":{"type":"string"},"type":"object"},"price_credits":{"description":"Selling price, the unit price actually charged.","format":"int64","type":"integer"}},"required":["kind","price_credits"],"type":"object"},"PublicPricingRule":{"properties":{"condition":{"$ref":"#/components/schemas/PublicPricingCondition"},"kind":{"type":"string"},"list_price_credits":{"description":"Provider's list price; omitted when it equals price_credits.","format":"int64","type":"integer"},"price_credits":{"description":"Selling price, the unit price actually charged.","format":"int64","type":"integer"}},"required":["kind","price_credits"],"type":"object"},"PublicPricingTier":{"properties":{"items":{"items":{"$ref":"#/components/schemas/PublicPricingItem"},"type":"array"},"up_to":{"format":"int64","type":"integer"}},"required":["items","up_to"],"type":"object"},"PublicPricingVariant":{"properties":{"items":{"items":{"$ref":"#/components/schemas/PublicPricingItem"},"type":"array"},"name":{"type":"string"}},"required":["name","items"],"type":"object"},"PublicTimeWindow":{"properties":{"end":{"description":"UTC HH:MM window end (exclusive).","type":"string"},"start":{"description":"UTC HH:MM window start (inclusive).","type":"string"}},"required":["start","end"],"type":"object"},"QuotePrice":{"properties":{"display_name":{"type":"string"},"pricing":{"$ref":"#/components/schemas/PublicPricingConfig"},"provider":{"type":"string"},"route_id":{"type":"string"}},"required":["route_id","provider","pricing"],"type":"object"},"QuoteResponse":{"properties":{"api":{"description":"Inbound API that was priced.","type":"string"},"model":{"description":"The model string as requested.","type":"string"},"model_id":{"description":"Canonical model ID the string resolves to.","type":"string"},"prices":{"description":"Routes that can serve the request; each request is charged at the price of the one that serves it.","items":{"$ref":"#/components/schemas/QuotePrice"},"type":"array"}},"required":["model","model_id","api","prices"],"type":"object"},"RealtimeCallRequest":{"properties":{"sdp":{"description":"WebRTC SDP offer.","type":"string"},"session":{"description":"JSON-encoded Realtime session object.","type":"string"}},"required":["sdp"],"type":"object"},"RealtimeClientSecretRequest":{"additionalProperties":true,"properties":{"expires_after":{"properties":{"anchor":{"enum":["created_at"],"type":"string"},"seconds":{"default":600,"description":"Seconds until the client secret expires.","maximum":7200,"minimum":10,"type":"integer"}},"type":"object"},"model":{"description":"OhMyGPT model ID. Used when `session.model` is omitted.","type":"string"},"session":{"$ref":"#/components/schemas/RealtimeSession"}},"type":"object"},"RealtimeClientSecretResponse":{"additionalProperties":true,"properties":{"expires_at":{"description":"Unix time when the client secret expires.","format":"int64","type":"integer"},"session":{"additionalProperties":true,"description":"The session settings, applied when a session opens with this client secret.","type":"object"},"value":{"description":"The client secret. Connect to `wss://api.ohmygpt.com/v1/realtime` with it in place of an API key.","type":"string"}},"required":["value","expires_at","session"],"type":"object"},"RealtimeSession":{"additionalProperties":true,"properties":{"model":{"description":"OhMyGPT model ID or provider-native model ID for the Realtime session.","type":"string"},"type":{"description":"Realtime session type. Defaults to `realtime`.","enum":["realtime"],"type":"string"}},"type":"object"},"Reasoning":{"description":"**gpt-5 and o-series models only**\n\nConfiguration options for\n[reasoning models](https://platform.openai.com/docs/guides/reasoning).\n","properties":{"effort":{"$ref":"#/components/schemas/ReasoningEffort"},"generate_summary":{"anyOf":[{"deprecated":true,"description":"**Deprecated:** use `summary` instead.\n\nA summary of the reasoning performed by the model. This can be\nuseful for debugging and understanding the model's reasoning process.\nOne of `auto`, `concise`, or `detailed`.\n","enum":["auto","concise","detailed"],"type":"string"},{"type":"null"}]},"summary":{"anyOf":[{"description":"A summary of the reasoning performed by the model. This can be\nuseful for debugging and understanding the model's reasoning process.\nOne of `auto`, `concise`, or `detailed`.\n\n`concise` is supported for `computer-use-preview` models and all reasoning models after `gpt-5`.\n","enum":["auto","concise","detailed"],"type":"string"},{"type":"null"}]}},"title":"Reasoning","type":"object"},"ReasoningEffort":{"anyOf":[{"default":"medium","description":"Constrains effort on reasoning for\n[reasoning models](https://platform.openai.com/docs/guides/reasoning).\nCurrently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing\nreasoning effort can result in faster responses and fewer tokens used\non reasoning in a response.\n\n- `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1.\n- All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`.\n- The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.\n- `xhigh` is supported for all models after `gpt-5.1-codex-max`.\n","enum":["none","minimal","low","medium","high","xhigh"],"type":"string"},{"type":"null"}]},"ReasoningEffortEnum":{"enum":["none","minimal","low","medium","high","xhigh","max"],"type":"string"},"ReasoningItem":{"description":"A description of the chain of thought used by a reasoning model while generating\na response. Be sure to include these items in your `input` to the Responses API\nfor subsequent turns of a conversation if you are manually\n[managing context](https://platform.openai.com/docs/guides/conversation-state).\n","properties":{"content":{"description":"Reasoning text content.\n","items":{"$ref":"#/components/schemas/ReasoningTextContent"},"type":"array"},"encrypted_content":{"anyOf":[{"description":"The encrypted content of the reasoning item - populated when a response is\ngenerated with `reasoning.encrypted_content` in the `include` parameter.\n","type":"string"},{"type":"null"}]},"id":{"description":"The unique identifier of the reasoning content.\n","type":"string"},"status":{"description":"The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n","enum":["in_progress","completed","incomplete"],"type":"string"},"summary":{"description":"Reasoning summary content.\n","items":{"$ref":"#/components/schemas/SummaryTextContent"},"type":"array"},"type":{"description":"The type of the object. Always `reasoning`.\n","enum":["reasoning"],"type":"string","x-stainless-const":true}},"required":["id","summary","type"],"title":"Reasoning","type":"object"},"ReasoningTextContent":{"description":"Reasoning text from the model.","properties":{"text":{"description":"The reasoning text from the model.","type":"string"},"type":{"default":"reasoning_text","description":"The type of the reasoning text. Always `reasoning_text`.","enum":["reasoning_text"],"type":"string","x-stainless-const":true}},"required":["type","text"],"title":"Reasoning text","type":"object"},"ReceiptCost":{"properties":{"credits":{"description":"User charged Credits represented by this receipt.","format":"int64","type":"integer"},"lines":{"description":"Itemized charges. The credits of all lines add up to `credits`. Absent for older requests, bring-your-own-key requests, and requests billed on the provider's reported cost.","items":{"$ref":"#/components/schemas/ReceiptLine"},"type":"array"},"list_credits":{"description":"Official list-price amount for this request, in Credits; list_credits minus credits is the saving (negative means a surcharge). Absent for older requests and bring-your-own-key requests.","format":"int64","type":"integer"}},"required":["credits"],"type":"object"},"ReceiptEvidence":{"properties":{"available":{"type":"boolean"},"warnings":{"items":{"$ref":"#/components/schemas/UsageWarning"},"type":"array"}},"required":["available","warnings"],"type":"object"},"ReceiptLine":{"description":"One charged item. Each line is rounded up to a whole Credit on its own, so on very small requests the total can sit above the unit-price ratio.","properties":{"credits":{"description":"Charged Credits for this item, ceil(price_credits × quantity / 1,000,000).","format":"int64","type":"integer"},"kind":{"description":"Pricing kind, using the same names as model pricing (for example `text.input`, `text.input.cached`, `text.output`).","example":"text.input","type":"string"},"list_price_credits":{"description":"Official list unit price, in Credits per 1,000,000 units. Absent when the model has no list price.","format":"int64","type":"integer"},"price_credits":{"description":"Unit price you paid, in Credits per 1,000,000 units.","format":"int64","type":"integer"},"quantity":{"description":"Units charged for this item (tokens for token kinds).","format":"int64","type":"integer"}},"required":["kind","quantity","price_credits","credits"],"type":"object"},"ReceiptModel":{"properties":{"id":{"type":"string"},"provider":{"type":"string"}},"required":["id","provider"],"type":"object"},"ReceiptRequest":{"description":"The request itself, as listed by `GET /v1/usage`.","properties":{"error":{"description":"Error message returned to the client; null when the request succeeded.","nullable":true,"type":"string"},"http_status":{"description":"HTTP status returned to the client.","type":"integer"},"input_api":{"description":"Inbound API the request used, for example openai-completions or anthropic-messages.","nullable":true,"type":"string"},"is_stream":{"type":"boolean"},"key_hint":{"description":"Mask of the API key that sent the request, as in `GET /v1/usage`; null for session or OAuth requests and for deleted keys.","nullable":true,"type":"string"}},"required":["http_status","error","input_api","key_hint","is_stream"],"type":"object"},"ReceiptTiming":{"properties":{"duration_ms":{"format":"int64","type":"integer"},"first_token_ms":{"format":"int64","type":"integer"}},"required":["duration_ms"],"type":"object"},"ReceiptUsage":{"properties":{"cache_creation_tokens":{"type":"integer"},"cache_read_tokens":{"type":"integer"},"input_tokens":{"type":"integer"},"output_tokens":{"type":"integer"},"reasoning_tokens":{"type":"integer"}},"required":["input_tokens","output_tokens","reasoning_tokens","cache_read_tokens","cache_creation_tokens"],"type":"object"},"RefusalContent":{"description":"A refusal from the model.","properties":{"refusal":{"description":"The refusal explanation from the model.","type":"string"},"type":{"default":"refusal","description":"The type of the refusal. Always `refusal`.","enum":["refusal"],"type":"string","x-stainless-const":true}},"required":["type","refusal"],"title":"Refusal","type":"object"},"RequestBashCodeExecutionToolResultBlock":{"description":"(Deep ref — see upstream Anthropic spec for full definition)","properties":{"type":{"type":"string"}},"required":["type"],"type":"object","x-upstream-stub":true},"RequestCharLocationCitation":{"additionalProperties":false,"properties":{"cited_text":{"title":"Cited Text","type":"string"},"document_index":{"minimum":0,"title":"Document Index","type":"integer"},"document_title":{"anyOf":[{"maxLength":255,"minLength":1,"type":"string"},{"type":"null"}],"title":"Document Title"},"end_char_index":{"title":"End Char Index","type":"integer"},"start_char_index":{"minimum":0,"title":"Start Char Index","type":"integer"},"type":{"const":"char_location","title":"Type","type":"string"}},"required":["cited_text","document_index","document_title","end_char_index","start_char_index","type"],"title":"RequestCharLocationCitation","type":"object"},"RequestCitationsConfig":{"additionalProperties":false,"properties":{"enabled":{"title":"Enabled","type":"boolean"}},"title":"RequestCitationsConfig","type":"object"},"RequestCodeExecutionToolResultBlock":{"description":"(Deep ref — see upstream Anthropic spec for full definition)","properties":{"type":{"type":"string"}},"required":["type"],"type":"object","x-upstream-stub":true},"RequestContainerUploadBlock":{"description":"A content block that represents a file to be uploaded to the container\nFiles uploaded via this block will be available in the container's input directory.","properties":{"type":{"type":"string"}},"required":["type"],"type":"object","x-upstream-stub":true},"RequestContentBlockLocationCitation":{"additionalProperties":false,"properties":{"cited_text":{"title":"Cited Text","type":"string"},"document_index":{"minimum":0,"title":"Document Index","type":"integer"},"document_title":{"anyOf":[{"maxLength":255,"minLength":1,"type":"string"},{"type":"null"}],"title":"Document Title"},"end_block_index":{"title":"End Block Index","type":"integer"},"start_block_index":{"minimum":0,"title":"Start Block Index","type":"integer"},"type":{"const":"content_block_location","title":"Type","type":"string"}},"required":["cited_text","document_index","document_title","end_block_index","start_block_index","type"],"title":"RequestContentBlockLocationCitation","type":"object"},"RequestDocumentBlock":{"description":"(Deep ref — see upstream Anthropic spec for full definition)","properties":{"type":{"type":"string"}},"required":["type"],"type":"object","x-upstream-stub":true},"RequestImageBlock":{"description":"(Deep ref — see upstream Anthropic spec for full definition)","properties":{"type":{"type":"string"}},"required":["type"],"type":"object","x-upstream-stub":true},"RequestPageLocationCitation":{"additionalProperties":false,"properties":{"cited_text":{"title":"Cited Text","type":"string"},"document_index":{"minimum":0,"title":"Document Index","type":"integer"},"document_title":{"anyOf":[{"maxLength":255,"minLength":1,"type":"string"},{"type":"null"}],"title":"Document Title"},"end_page_number":{"title":"End Page Number","type":"integer"},"start_page_number":{"minimum":1,"title":"Start Page Number","type":"integer"},"type":{"const":"page_location","title":"Type","type":"string"}},"required":["cited_text","document_index","document_title","end_page_number","start_page_number","type"],"title":"RequestPageLocationCitation","type":"object"},"RequestReceipt":{"properties":{"cost":{"$ref":"#/components/schemas/ReceiptCost"},"created_at":{"format":"date-time","type":"string"},"id":{"description":"Same value as request_id; kept as the canonical object id.","type":"string"},"model":{"$ref":"#/components/schemas/ReceiptModel"},"object":{"enum":["request_receipt"],"type":"string"},"receipt":{"$ref":"#/components/schemas/ReceiptEvidence"},"request":{"$ref":"#/components/schemas/ReceiptRequest"},"request_id":{"type":"string"},"status":{"enum":["succeeded","failed","partial","unknown"],"type":"string"},"timing":{"$ref":"#/components/schemas/ReceiptTiming"},"usage":{"$ref":"#/components/schemas/ReceiptUsage"},"verirelay":{"$ref":"#/components/schemas/VeriRelayReceipt"}},"required":["object","id","request_id","created_at","status","request","model","usage","cost","timing","receipt"],"type":"object"},"RequestRedactedThinkingBlock":{"description":"(Deep ref — see upstream Anthropic spec for full definition)","properties":{"type":{"type":"string"}},"required":["type"],"type":"object","x-upstream-stub":true},"RequestSearchResultBlock":{"description":"(Deep ref — see upstream Anthropic spec for full definition)","properties":{"type":{"type":"string"}},"required":["type"],"type":"object","x-upstream-stub":true},"RequestSearchResultLocationCitation":{"additionalProperties":false,"properties":{"cited_text":{"title":"Cited Text","type":"string"},"end_block_index":{"title":"End Block Index","type":"integer"},"search_result_index":{"minimum":0,"title":"Search Result Index","type":"integer"},"source":{"title":"Source","type":"string"},"start_block_index":{"minimum":0,"title":"Start Block Index","type":"integer"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"type":{"const":"search_result_location","title":"Type","type":"string"}},"required":["cited_text","end_block_index","search_result_index","source","start_block_index","title","type"],"title":"RequestSearchResultLocationCitation","type":"object"},"RequestServerToolUseBlock":{"description":"(Deep ref — see upstream Anthropic spec for full definition)","properties":{"type":{"type":"string"}},"required":["type"],"type":"object","x-upstream-stub":true},"RequestTextBlock":{"additionalProperties":false,"properties":{"cache_control":{"anyOf":[{"discriminator":{"mapping":{"ephemeral":"#/components/schemas/CacheControlEphemeral"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/CacheControlEphemeral"}]},{"type":"null"}],"description":"Create a cache control breakpoint at this content block.","title":"Cache Control"},"citations":{"anyOf":[{"items":{"discriminator":{"mapping":{"char_location":"#/components/schemas/RequestCharLocationCitation","content_block_location":"#/components/schemas/RequestContentBlockLocationCitation","page_location":"#/components/schemas/RequestPageLocationCitation","search_result_location":"#/components/schemas/RequestSearchResultLocationCitation","web_search_result_location":"#/components/schemas/RequestWebSearchResultLocationCitation"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/RequestCharLocationCitation"},{"$ref":"#/components/schemas/RequestPageLocationCitation"},{"$ref":"#/components/schemas/RequestContentBlockLocationCitation"},{"$ref":"#/components/schemas/RequestWebSearchResultLocationCitation"},{"$ref":"#/components/schemas/RequestSearchResultLocationCitation"}]},"type":"array"},{"type":"null"}],"title":"Citations"},"text":{"minLength":1,"title":"Text","type":"string"},"type":{"const":"text","title":"Type","type":"string"}},"required":["text","type"],"title":"RequestTextBlock","type":"object"},"RequestTextEditorCodeExecutionToolResultBlock":{"description":"(Deep ref — see upstream Anthropic spec for full definition)","properties":{"type":{"type":"string"}},"required":["type"],"type":"object","x-upstream-stub":true},"RequestThinkingBlock":{"description":"(Deep ref — see upstream Anthropic spec for full definition)","properties":{"type":{"type":"string"}},"required":["type"],"type":"object","x-upstream-stub":true},"RequestToolResultBlock":{"description":"(Deep ref — see upstream Anthropic spec for full definition)","properties":{"type":{"type":"string"}},"required":["type"],"type":"object","x-upstream-stub":true},"RequestToolSearchToolResultBlock":{"description":"(Deep ref — see upstream Anthropic spec for full definition)","properties":{"type":{"type":"string"}},"required":["type"],"type":"object","x-upstream-stub":true},"RequestToolUseBlock":{"description":"(Deep ref — see upstream Anthropic spec for full definition)","properties":{"type":{"type":"string"}},"required":["type"],"type":"object","x-upstream-stub":true},"RequestWebFetchToolResultBlock":{"description":"(Deep ref — see upstream Anthropic spec for full definition)","properties":{"type":{"type":"string"}},"required":["type"],"type":"object","x-upstream-stub":true},"RequestWebSearchResultLocationCitation":{"additionalProperties":false,"properties":{"cited_text":{"title":"Cited Text","type":"string"},"encrypted_index":{"title":"Encrypted Index","type":"string"},"title":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"title":"Title"},"type":{"const":"web_search_result_location","title":"Type","type":"string"},"url":{"maxLength":2048,"minLength":1,"title":"Url","type":"string"}},"required":["cited_text","encrypted_index","title","type","url"],"title":"RequestWebSearchResultLocationCitation","type":"object"},"RequestWebSearchToolResultBlock":{"description":"(Deep ref — see upstream Anthropic spec for full definition)","properties":{"type":{"type":"string"}},"required":["type"],"type":"object","x-upstream-stub":true},"RerankRequest":{"additionalProperties":true,"description":"Fields other than these three, such as `top_n` and `return_documents`, are passed to the model unchanged.","properties":{"documents":{"description":"The documents to order, as strings or as objects with a `text` field.","items":{"oneOf":[{"type":"string"},{"additionalProperties":true,"properties":{"text":{"type":"string"}},"type":"object"}]},"minItems":1,"type":"array"},"model":{"description":"A rerank model ID from `GET /v1/models`","type":"string"},"query":{"type":"string"},"top_n":{"description":"Return only the most relevant N documents.","minimum":1,"type":"integer"}},"required":["model","query","documents"],"type":"object"},"RerankResponse":{"additionalProperties":true,"description":"The model's rerank response.","properties":{"id":{"type":"string"},"results":{"description":"Documents ordered from most to least relevant.","items":{"additionalProperties":true,"properties":{"index":{"description":"The document's position in the request's `documents`","type":"integer"},"relevance_score":{"description":"Relevance to the query, from 0 to 1","type":"number"}},"required":["index","relevance_score"],"type":"object"},"type":"array"}},"type":"object"},"RespInputMessage":{"description":"A message input to the model with a role indicating instruction following\nhierarchy. Instructions given with the `developer` or `system` role take\nprecedence over instructions given with the `user` role.\n","properties":{"content":{"$ref":"#/components/schemas/InputMessageContentList"},"role":{"description":"The role of the message input. One of `user`, `system`, or `developer`.\n","enum":["user","system","developer"],"type":"string"},"status":{"description":"The status of item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n","enum":["in_progress","completed","incomplete"],"type":"string"},"type":{"description":"The type of the message input. Always set to `message`.\n","enum":["message"],"type":"string","x-stainless-const":true}},"required":["role","content"],"title":"Input message","type":"object"},"RespMetadata":{"anyOf":[{"additionalProperties":{"type":"string"},"description":"Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard.\n\nKeys are strings with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.\n","type":"object","x-oaiTypeLabel":"map"},{"type":"null"}]},"RespTool":{"description":"A tool that can be used to generate a response.\n","oneOf":[{"$ref":"#/components/schemas/FunctionTool"},{"$ref":"#/components/schemas/FileSearchTool"},{"$ref":"#/components/schemas/ComputerUsePreviewTool"},{"$ref":"#/components/schemas/WebSearchTool"},{"$ref":"#/components/schemas/MCPTool"},{"$ref":"#/components/schemas/CodeInterpreterTool"},{"$ref":"#/components/schemas/ImageGenTool"},{"$ref":"#/components/schemas/LocalShellToolParam"},{"$ref":"#/components/schemas/FunctionShellToolParam"},{"$ref":"#/components/schemas/CustomToolParam"},{"$ref":"#/components/schemas/WebSearchPreviewTool"},{"$ref":"#/components/schemas/ApplyPatchToolParam"}]},"Response":{"allOf":[{"$ref":"#/components/schemas/ModelResponseProperties"},{"$ref":"#/components/schemas/ResponseProperties"},{"properties":{"completed_at":{"anyOf":[{"description":"Unix timestamp (in seconds) of when this Response was completed.\nOnly present when the status is `completed`.\n","type":"number"},{"type":"null"}]},"conversation":{"anyOf":[{"$ref":"#/components/schemas/Conversation-2","default":null},{"type":"null"}]},"created_at":{"description":"Unix timestamp (in seconds) of when this Response was created.\n","type":"number"},"error":{"$ref":"#/components/schemas/ResponseError"},"id":{"description":"Unique identifier for this Response.\n","type":"string"},"incomplete_details":{"anyOf":[{"description":"Details about why the response is incomplete.\n","properties":{"reason":{"description":"The reason why the response is incomplete.","enum":["max_output_tokens","content_filter"],"type":"string"}},"type":"object"},{"type":"null"}]},"instructions":{"anyOf":[{"description":"A system (or developer) message inserted into the model's context.\n\nWhen using along with `previous_response_id`, the instructions from a previous\nresponse will not be carried over to the next response. This makes it simple\nto swap out system (or developer) messages in new responses.\n","oneOf":[{"description":"A text input to the model, equivalent to a text input with the\n`developer` role.\n","type":"string"},{"description":"A list of one or many input items to the model, containing\ndifferent content types.\n","items":{"$ref":"#/components/schemas/InputItem"},"title":"Input item list","type":"array"}]},{"type":"null"}]},"object":{"description":"The object type of this resource - always set to `response`.\n","enum":["response"],"type":"string","x-stainless-const":true},"output":{"description":"An array of content items generated by the model.\n\n- The length and order of items in the `output` array is dependent\n  on the model's response.\n- Rather than accessing the first item in the `output` array and\n  assuming it's an `assistant` message with the content generated by\n  the model, you might consider using the `output_text` property where\n  supported in SDKs.\n","items":{"$ref":"#/components/schemas/OutputItem"},"type":"array"},"output_text":{"anyOf":[{"description":"SDK-only convenience property that contains the aggregated text output\nfrom all `output_text` items in the `output` array, if any are present.\nSupported in the Python and JavaScript SDKs.\n","type":"string","x-oaiSupportedSDKs":["python","javascript"]},{"type":"null"}]},"parallel_tool_calls":{"default":true,"description":"Whether to allow the model to run tool calls in parallel.\n","type":"boolean"},"status":{"description":"The status of the response generation. One of `completed`, `failed`,\n`in_progress`, `cancelled`, `queued`, or `incomplete`.\n","enum":["completed","failed","in_progress","cancelled","queued","incomplete"],"type":"string"},"usage":{"$ref":"#/components/schemas/ResponseUsage"}},"required":["id","object","created_at","error","incomplete_details","instructions","model","tools","output","parallel_tool_calls","metadata","tool_choice","temperature","top_p"],"type":"object"}],"example":{"completed_at":1741476778,"created_at":1741476777,"error":null,"id":"resp_67ccd3a9da748190baa7f1570fe91ac604becb25c45c1d41","incomplete_details":null,"instructions":null,"max_output_tokens":null,"metadata":{},"model":"gpt-4o-2024-08-06","object":"response","output":[{"content":[{"annotations":[],"text":"The image depicts a scenic landscape with a wooden boardwalk or pathway leading through lush, green grass under a blue sky with some clouds. The setting suggests a peaceful natural area, possibly a park or nature reserve. There are trees and shrubs in the background.","type":"output_text"}],"id":"msg_67ccd3acc8d48190a77525dc6de64b4104becb25c45c1d41","role":"assistant","status":"completed","type":"message"}],"parallel_tool_calls":true,"previous_response_id":null,"reasoning":{"effort":null,"summary":null},"status":"completed","store":true,"temperature":1,"text":{"format":{"type":"text"}},"tool_choice":"auto","tools":[],"top_p":1,"truncation":"disabled","usage":{"input_tokens":328,"input_tokens_details":{"cached_tokens":0},"output_tokens":52,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":380},"user":null},"title":"The response object"},"ResponseAudioDeltaEvent":{"description":"Emitted when there is a partial audio response.","properties":{"delta":{"description":"A chunk of Base64 encoded response audio bytes.\n","type":"string"},"sequence_number":{"description":"A sequence number for this chunk of the stream response.\n","type":"integer"},"type":{"description":"The type of the event. Always `response.audio.delta`.\n","enum":["response.audio.delta"],"type":"string","x-stainless-const":true}},"required":["type","delta","sequence_number"],"type":"object","x-oaiMeta":{"example":"{\n  \"type\": \"response.audio.delta\",\n  \"response_id\": \"resp_123\",\n  \"delta\": \"base64encoded...\",\n  \"sequence_number\": 1\n}\n","group":"responses","name":"response.audio.delta"}},"ResponseAudioDoneEvent":{"description":"Emitted when the audio response is complete.","properties":{"sequence_number":{"description":"The sequence number of the delta.\n","type":"integer"},"type":{"description":"The type of the event. Always `response.audio.done`.\n","enum":["response.audio.done"],"type":"string","x-stainless-const":true}},"required":["type","sequence_number","response_id"],"type":"object","x-oaiMeta":{"example":"{\n  \"type\": \"response.audio.done\",\n  \"response_id\": \"resp-123\",\n  \"sequence_number\": 1\n}\n","group":"responses","name":"response.audio.done"}},"ResponseAudioTranscriptDeltaEvent":{"description":"Emitted when there is a partial transcript of audio.","properties":{"delta":{"description":"The partial transcript of the audio response.\n","type":"string"},"sequence_number":{"description":"The sequence number of this event.","type":"integer"},"type":{"description":"The type of the event. Always `response.audio.transcript.delta`.\n","enum":["response.audio.transcript.delta"],"type":"string","x-stainless-const":true}},"required":["type","response_id","delta","sequence_number"],"type":"object","x-oaiMeta":{"example":"{\n  \"type\": \"response.audio.transcript.delta\",\n  \"response_id\": \"resp_123\",\n  \"delta\": \" ... partial transcript ... \",\n  \"sequence_number\": 1\n}\n","group":"responses","name":"response.audio.transcript.delta"}},"ResponseAudioTranscriptDoneEvent":{"description":"Emitted when the full audio transcript is completed.","properties":{"sequence_number":{"description":"The sequence number of this event.","type":"integer"},"type":{"description":"The type of the event. Always `response.audio.transcript.done`.\n","enum":["response.audio.transcript.done"],"type":"string","x-stainless-const":true}},"required":["type","response_id","sequence_number"],"type":"object","x-oaiMeta":{"example":"{\n  \"type\": \"response.audio.transcript.done\",\n  \"response_id\": \"resp_123\",\n  \"sequence_number\": 1\n}\n","group":"responses","name":"response.audio.transcript.done"}},"ResponseBashCodeExecutionResultBlock":{"description":"(Deep ref — see upstream Anthropic spec for full definition)","type":"object","x-upstream-stub":true},"ResponseBashCodeExecutionToolResultBlock":{"properties":{"content":{"anyOf":[{"$ref":"#/components/schemas/ResponseBashCodeExecutionToolResultError"},{"$ref":"#/components/schemas/ResponseBashCodeExecutionResultBlock"}],"title":"Content"},"tool_use_id":{"pattern":"^srvtoolu_[a-zA-Z0-9_]+$","title":"Tool Use Id","type":"string"},"type":{"const":"bash_code_execution_tool_result","default":"bash_code_execution_tool_result","title":"Type","type":"string"}},"required":["content","tool_use_id","type"],"title":"ResponseBashCodeExecutionToolResultBlock","type":"object"},"ResponseBashCodeExecutionToolResultError":{"description":"(Deep ref — see upstream Anthropic spec for full definition)","type":"object","x-upstream-stub":true},"ResponseCharLocationCitation":{"description":"(Deep ref — see upstream Anthropic spec for full definition)","properties":{"type":{"type":"string"}},"required":["type"],"type":"object","x-upstream-stub":true},"ResponseCodeExecutionResultBlock":{"description":"(Deep ref — see upstream Anthropic spec for full definition)","type":"object","x-upstream-stub":true},"ResponseCodeExecutionToolResultBlock":{"properties":{"content":{"anyOf":[{"$ref":"#/components/schemas/ResponseCodeExecutionToolResultError"},{"$ref":"#/components/schemas/ResponseCodeExecutionResultBlock"},{"$ref":"#/components/schemas/ResponseEncryptedCodeExecutionResultBlock"}],"title":"Content"},"tool_use_id":{"pattern":"^srvtoolu_[a-zA-Z0-9_]+$","title":"Tool Use Id","type":"string"},"type":{"const":"code_execution_tool_result","default":"code_execution_tool_result","title":"Type","type":"string"}},"required":["content","tool_use_id","type"],"title":"ResponseCodeExecutionToolResultBlock","type":"object"},"ResponseCodeExecutionToolResultError":{"description":"(Deep ref — see upstream Anthropic spec for full definition)","type":"object","x-upstream-stub":true},"ResponseCodeInterpreterCallCodeDeltaEvent":{"description":"Emitted when a partial code snippet is streamed by the code interpreter.","properties":{"delta":{"description":"The partial code snippet being streamed by the code interpreter.","type":"string"},"item_id":{"description":"The unique identifier of the code interpreter tool call item.","type":"string"},"output_index":{"description":"The index of the output item in the response for which the code is being streamed.","type":"integer"},"sequence_number":{"description":"The sequence number of this event, used to order streaming events.","type":"integer"},"type":{"description":"The type of the event. Always `response.code_interpreter_call_code.delta`.","enum":["response.code_interpreter_call_code.delta"],"type":"string","x-stainless-const":true}},"required":["type","output_index","item_id","delta","sequence_number"],"type":"object","x-oaiMeta":{"example":"{\n  \"type\": \"response.code_interpreter_call_code.delta\",\n  \"output_index\": 0,\n  \"item_id\": \"ci_12345\",\n  \"delta\": \"print('Hello, world')\",\n  \"sequence_number\": 1\n}\n","group":"responses","name":"response.code_interpreter_call_code.delta"}},"ResponseCodeInterpreterCallCodeDoneEvent":{"description":"Emitted when the code snippet is finalized by the code interpreter.","properties":{"code":{"description":"The final code snippet output by the code interpreter.","type":"string"},"item_id":{"description":"The unique identifier of the code interpreter tool call item.","type":"string"},"output_index":{"description":"The index of the output item in the response for which the code is finalized.","type":"integer"},"sequence_number":{"description":"The sequence number of this event, used to order streaming events.","type":"integer"},"type":{"description":"The type of the event. Always `response.code_interpreter_call_code.done`.","enum":["response.code_interpreter_call_code.done"],"type":"string","x-stainless-const":true}},"required":["type","output_index","item_id","code","sequence_number"],"type":"object","x-oaiMeta":{"example":"{\n  \"type\": \"response.code_interpreter_call_code.done\",\n  \"output_index\": 3,\n  \"item_id\": \"ci_12345\",\n  \"code\": \"print('done')\",\n  \"sequence_number\": 1\n}\n","group":"responses","name":"response.code_interpreter_call_code.done"}},"ResponseCodeInterpreterCallCompletedEvent":{"description":"Emitted when the code interpreter call is completed.","properties":{"item_id":{"description":"The unique identifier of the code interpreter tool call item.","type":"string"},"output_index":{"description":"The index of the output item in the response for which the code interpreter call is completed.","type":"integer"},"sequence_number":{"description":"The sequence number of this event, used to order streaming events.","type":"integer"},"type":{"description":"The type of the event. Always `response.code_interpreter_call.completed`.","enum":["response.code_interpreter_call.completed"],"type":"string","x-stainless-const":true}},"required":["type","output_index","item_id","sequence_number"],"type":"object","x-oaiMeta":{"example":"{\n  \"type\": \"response.code_interpreter_call.completed\",\n  \"output_index\": 5,\n  \"item_id\": \"ci_12345\",\n  \"sequence_number\": 1\n}\n","group":"responses","name":"response.code_interpreter_call.completed"}},"ResponseCodeInterpreterCallInProgressEvent":{"description":"Emitted when a code interpreter call is in progress.","properties":{"item_id":{"description":"The unique identifier of the code interpreter tool call item.","type":"string"},"output_index":{"description":"The index of the output item in the response for which the code interpreter call is in progress.","type":"integer"},"sequence_number":{"description":"The sequence number of this event, used to order streaming events.","type":"integer"},"type":{"description":"The type of the event. Always `response.code_interpreter_call.in_progress`.","enum":["response.code_interpreter_call.in_progress"],"type":"string","x-stainless-const":true}},"required":["type","output_index","item_id","sequence_number"],"type":"object","x-oaiMeta":{"example":"{\n  \"type\": \"response.code_interpreter_call.in_progress\",\n  \"output_index\": 0,\n  \"item_id\": \"ci_12345\",\n  \"sequence_number\": 1\n}\n","group":"responses","name":"response.code_interpreter_call.in_progress"}},"ResponseCodeInterpreterCallInterpretingEvent":{"description":"Emitted when the code interpreter is actively interpreting the code snippet.","properties":{"item_id":{"description":"The unique identifier of the code interpreter tool call item.","type":"string"},"output_index":{"description":"The index of the output item in the response for which the code interpreter is interpreting code.","type":"integer"},"sequence_number":{"description":"The sequence number of this event, used to order streaming events.","type":"integer"},"type":{"description":"The type of the event. Always `response.code_interpreter_call.interpreting`.","enum":["response.code_interpreter_call.interpreting"],"type":"string","x-stainless-const":true}},"required":["type","output_index","item_id","sequence_number"],"type":"object","x-oaiMeta":{"example":"{\n  \"type\": \"response.code_interpreter_call.interpreting\",\n  \"output_index\": 4,\n  \"item_id\": \"ci_12345\",\n  \"sequence_number\": 1\n}\n","group":"responses","name":"response.code_interpreter_call.interpreting"}},"ResponseCompletedEvent":{"description":"Emitted when the model response is complete.","properties":{"response":{"$ref":"#/components/schemas/Response","description":"Properties of the completed response.\n"},"sequence_number":{"description":"The sequence number for this event.","type":"integer"},"type":{"description":"The type of the event. Always `response.completed`.\n","enum":["response.completed"],"type":"string","x-stainless-const":true}},"required":["type","response","sequence_number"],"type":"object","x-oaiMeta":{"example":"{\n  \"type\": \"response.completed\",\n  \"response\": {\n    \"id\": \"resp_123\",\n    \"object\": \"response\",\n    \"created_at\": 1740855869,\n    \"status\": \"completed\",\n    \"completed_at\": 1740855870,\n    \"error\": null,\n    \"incomplete_details\": null,\n    \"input\": [],\n    \"instructions\": null,\n    \"max_output_tokens\": null,\n    \"model\": \"gpt-4o-mini-2024-07-18\",\n    \"output\": [\n      {\n        \"id\": \"msg_123\",\n        \"type\": \"message\",\n        \"role\": \"assistant\",\n        \"content\": [\n          {\n            \"type\": \"output_text\",\n            \"text\": \"In a shimmering forest under a sky full of stars, a lonely unicorn named Lila discovered a hidden pond that glowed with moonlight. Every night, she would leave sparkling, magical flowers by the water's edge, hoping to share her beauty with others. One enchanting evening, she woke to find a group of friendly animals gathered around, eager to be friends and share in her magic.\",\n            \"annotations\": []\n          }\n        ]\n      }\n    ],\n    \"previous_response_id\": null,\n    \"reasoning_effort\": null,\n    \"store\": false,\n    \"temperature\": 1,\n    \"text\": {\n      \"format\": {\n        \"type\": \"text\"\n      }\n    },\n    \"tool_choice\": \"auto\",\n    \"tools\": [],\n    \"top_p\": 1,\n    \"truncation\": \"disabled\",\n    \"usage\": {\n      \"input_tokens\": 0,\n      \"output_tokens\": 0,\n      \"output_tokens_details\": {\n        \"reasoning_tokens\": 0\n      },\n      \"total_tokens\": 0\n    },\n    \"user\": null,\n    \"metadata\": {}\n  },\n  \"sequence_number\": 1\n}\n","group":"responses","name":"response.completed"}},"ResponseContainerUploadBlock":{"description":"Response model for a file uploaded to the container.","properties":{"file_id":{"title":"File Id","type":"string"},"type":{"const":"container_upload","default":"container_upload","title":"Type","type":"string"}},"required":["file_id","type"],"title":"ResponseContainerUploadBlock","type":"object"},"ResponseContentBlockLocationCitation":{"description":"(Deep ref — see upstream Anthropic spec for full definition)","properties":{"type":{"type":"string"}},"required":["type"],"type":"object","x-upstream-stub":true},"ResponseContentPartAddedEvent":{"description":"Emitted when a new content part is added.","properties":{"content_index":{"description":"The index of the content part that was added.\n","type":"integer"},"item_id":{"description":"The ID of the output item that the content part was added to.\n","type":"string"},"output_index":{"description":"The index of the output item that the content part was added to.\n","type":"integer"},"part":{"$ref":"#/components/schemas/OutputContent","description":"The content part that was added.\n"},"sequence_number":{"description":"The sequence number of this event.","type":"integer"},"type":{"description":"The type of the event. Always `response.content_part.added`.\n","enum":["response.content_part.added"],"type":"string","x-stainless-const":true}},"required":["type","item_id","output_index","content_index","part","sequence_number"],"type":"object","x-oaiMeta":{"example":"{\n  \"type\": \"response.content_part.added\",\n  \"item_id\": \"msg_123\",\n  \"output_index\": 0,\n  \"content_index\": 0,\n  \"part\": {\n    \"type\": \"output_text\",\n    \"text\": \"\",\n    \"annotations\": []\n  },\n  \"sequence_number\": 1\n}\n","group":"responses","name":"response.content_part.added"}},"ResponseContentPartDoneEvent":{"description":"Emitted when a content part is done.","properties":{"content_index":{"description":"The index of the content part that is done.\n","type":"integer"},"item_id":{"description":"The ID of the output item that the content part was added to.\n","type":"string"},"output_index":{"description":"The index of the output item that the content part was added to.\n","type":"integer"},"part":{"$ref":"#/components/schemas/OutputContent","description":"The content part that is done.\n"},"sequence_number":{"description":"The sequence number of this event.","type":"integer"},"type":{"description":"The type of the event. Always `response.content_part.done`.\n","enum":["response.content_part.done"],"type":"string","x-stainless-const":true}},"required":["type","item_id","output_index","content_index","part","sequence_number"],"type":"object","x-oaiMeta":{"example":"{\n  \"type\": \"response.content_part.done\",\n  \"item_id\": \"msg_123\",\n  \"output_index\": 0,\n  \"content_index\": 0,\n  \"sequence_number\": 1,\n  \"part\": {\n    \"type\": \"output_text\",\n    \"text\": \"In a shimmering forest under a sky full of stars, a lonely unicorn named Lila discovered a hidden pond that glowed with moonlight. Every night, she would leave sparkling, magical flowers by the water's edge, hoping to share her beauty with others. One enchanting evening, she woke to find a group of friendly animals gathered around, eager to be friends and share in her magic.\",\n    \"annotations\": []\n  }\n}\n","group":"responses","name":"response.content_part.done"}},"ResponseCreatedEvent":{"description":"An event that is emitted when a response is created.\n","properties":{"response":{"$ref":"#/components/schemas/Response","description":"The response that was created.\n"},"sequence_number":{"description":"The sequence number for this event.","type":"integer"},"type":{"description":"The type of the event. Always `response.created`.\n","enum":["response.created"],"type":"string","x-stainless-const":true}},"required":["type","response","sequence_number"],"type":"object","x-oaiMeta":{"example":"{\n  \"type\": \"response.created\",\n  \"response\": {\n    \"id\": \"resp_67ccfcdd16748190a91872c75d38539e09e4d4aac714747c\",\n    \"object\": \"response\",\n    \"created_at\": 1741487325,\n    \"status\": \"in_progress\",\n    \"completed_at\": null,\n    \"error\": null,\n    \"incomplete_details\": null,\n    \"instructions\": null,\n    \"max_output_tokens\": null,\n    \"model\": \"gpt-4o-2024-08-06\",\n    \"output\": [],\n    \"parallel_tool_calls\": true,\n    \"previous_response_id\": null,\n    \"reasoning\": {\n      \"effort\": null,\n      \"summary\": null\n    },\n    \"store\": true,\n    \"temperature\": 1,\n    \"text\": {\n      \"format\": {\n        \"type\": \"text\"\n      }\n    },\n    \"tool_choice\": \"auto\",\n    \"tools\": [],\n    \"top_p\": 1,\n    \"truncation\": \"disabled\",\n    \"usage\": null,\n    \"user\": null,\n    \"metadata\": {}\n  },\n  \"sequence_number\": 1\n}\n","group":"responses","name":"response.created"}},"ResponseCustomToolCallInputDeltaEvent":{"description":"Event representing a delta (partial update) to the input of a custom tool call.\n","properties":{"delta":{"description":"The incremental input data (delta) for the custom tool call.","type":"string"},"item_id":{"description":"Unique identifier for the API item associated with this event.","type":"string"},"output_index":{"description":"The index of the output this delta applies to.","type":"integer"},"sequence_number":{"description":"The sequence number of this event.","type":"integer"},"type":{"description":"The event type identifier.","enum":["response.custom_tool_call_input.delta"],"type":"string","x-stainless-const":true}},"required":["type","output_index","item_id","delta","sequence_number"],"title":"ResponseCustomToolCallInputDelta","type":"object","x-oaiMeta":{"example":"{\n  \"type\": \"response.custom_tool_call_input.delta\",\n  \"output_index\": 0,\n  \"item_id\": \"ctc_1234567890abcdef\",\n  \"delta\": \"partial input text\"\n}\n","group":"responses","name":"response.custom_tool_call_input.delta"}},"ResponseCustomToolCallInputDoneEvent":{"description":"Event indicating that input for a custom tool call is complete.\n","properties":{"input":{"description":"The complete input data for the custom tool call.","type":"string"},"item_id":{"description":"Unique identifier for the API item associated with this event.","type":"string"},"output_index":{"description":"The index of the output this event applies to.","type":"integer"},"sequence_number":{"description":"The sequence number of this event.","type":"integer"},"type":{"description":"The event type identifier.","enum":["response.custom_tool_call_input.done"],"type":"string","x-stainless-const":true}},"required":["type","output_index","item_id","input","sequence_number"],"title":"ResponseCustomToolCallInputDone","type":"object","x-oaiMeta":{"example":"{\n  \"type\": \"response.custom_tool_call_input.done\",\n  \"output_index\": 0,\n  \"item_id\": \"ctc_1234567890abcdef\",\n  \"input\": \"final complete input text\"\n}\n","group":"responses","name":"response.custom_tool_call_input.done"}},"ResponseDeleteResult":{"properties":{"deleted":{"type":"boolean"},"id":{"type":"string"},"object":{"enum":["response.deleted"],"type":"string"}},"required":["id","object","deleted"],"type":"object"},"ResponseEncryptedCodeExecutionResultBlock":{"description":"Code execution result with encrypted stdout for PFC + web_search results.","type":"object","x-upstream-stub":true},"ResponseError":{"anyOf":[{"description":"An error object returned when the model fails to generate a Response.\n","properties":{"code":{"$ref":"#/components/schemas/ResponseErrorCode"},"message":{"description":"A human-readable description of the error.\n","type":"string"}},"required":["code","message"],"type":"object"},{"type":"null"}]},"ResponseErrorCode":{"description":"The error code for the response.\n","enum":["server_error","rate_limit_exceeded","invalid_prompt","vector_store_timeout","invalid_image","invalid_image_format","invalid_base64_image","invalid_image_url","image_too_large","image_too_small","image_parse_error","image_content_policy_violation","invalid_image_mode","image_file_too_large","unsupported_image_media_type","empty_image_file","failed_to_download_image","image_file_not_found"],"type":"string"},"ResponseErrorEvent":{"description":"Emitted when an error occurs.","properties":{"code":{"anyOf":[{"description":"The error code.\n","type":"string"},{"type":"null"}]},"message":{"description":"The error message.\n","type":"string"},"param":{"anyOf":[{"description":"The error parameter.\n","type":"string"},{"type":"null"}]},"sequence_number":{"description":"The sequence number of this event.","type":"integer"},"type":{"description":"The type of the event. Always `error`.\n","enum":["error"],"type":"string","x-stainless-const":true}},"required":["type","code","message","param","sequence_number"],"type":"object","x-oaiMeta":{"example":"{\n  \"type\": \"error\",\n  \"code\": \"ERR_SOMETHING\",\n  \"message\": \"Something went wrong\",\n  \"param\": null,\n  \"sequence_number\": 1\n}\n","group":"responses","name":"error"}},"ResponseFailedEvent":{"description":"An event that is emitted when a response fails.\n","properties":{"response":{"$ref":"#/components/schemas/Response","description":"The response that failed.\n"},"sequence_number":{"description":"The sequence number of this event.","type":"integer"},"type":{"description":"The type of the event. Always `response.failed`.\n","enum":["response.failed"],"type":"string","x-stainless-const":true}},"required":["type","response","sequence_number"],"type":"object","x-oaiMeta":{"example":"{\n  \"type\": \"response.failed\",\n  \"response\": {\n    \"id\": \"resp_123\",\n    \"object\": \"response\",\n    \"created_at\": 1740855869,\n    \"status\": \"failed\",\n    \"completed_at\": null,\n    \"error\": {\n      \"code\": \"server_error\",\n      \"message\": \"The model failed to generate a response.\"\n    },\n    \"incomplete_details\": null,\n    \"instructions\": null,\n    \"max_output_tokens\": null,\n    \"model\": \"gpt-4o-mini-2024-07-18\",\n    \"output\": [],\n    \"previous_response_id\": null,\n    \"reasoning_effort\": null,\n    \"store\": false,\n    \"temperature\": 1,\n    \"text\": {\n      \"format\": {\n        \"type\": \"text\"\n      }\n    },\n    \"tool_choice\": \"auto\",\n    \"tools\": [],\n    \"top_p\": 1,\n    \"truncation\": \"disabled\",\n    \"usage\": null,\n    \"user\": null,\n    \"metadata\": {}\n  }\n}\n","group":"responses","name":"response.failed"}},"ResponseFileSearchCallCompletedEvent":{"description":"Emitted when a file search call is completed (results found).","properties":{"item_id":{"description":"The ID of the output item that the file search call is initiated.\n","type":"string"},"output_index":{"description":"The index of the output item that the file search call is initiated.\n","type":"integer"},"sequence_number":{"description":"The sequence number of this event.","type":"integer"},"type":{"description":"The type of the event. Always `response.file_search_call.completed`.\n","enum":["response.file_search_call.completed"],"type":"string","x-stainless-const":true}},"required":["type","output_index","item_id","sequence_number"],"type":"object","x-oaiMeta":{"example":"{\n  \"type\": \"response.file_search_call.completed\",\n  \"output_index\": 0,\n  \"item_id\": \"fs_123\",\n  \"sequence_number\": 1\n}\n","group":"responses","name":"response.file_search_call.completed"}},"ResponseFileSearchCallInProgressEvent":{"description":"Emitted when a file search call is initiated.","properties":{"item_id":{"description":"The ID of the output item that the file search call is initiated.\n","type":"string"},"output_index":{"description":"The index of the output item that the file search call is initiated.\n","type":"integer"},"sequence_number":{"description":"The sequence number of this event.","type":"integer"},"type":{"description":"The type of the event. Always `response.file_search_call.in_progress`.\n","enum":["response.file_search_call.in_progress"],"type":"string","x-stainless-const":true}},"required":["type","output_index","item_id","sequence_number"],"type":"object","x-oaiMeta":{"example":"{\n  \"type\": \"response.file_search_call.in_progress\",\n  \"output_index\": 0,\n  \"item_id\": \"fs_123\",\n  \"sequence_number\": 1\n}\n","group":"responses","name":"response.file_search_call.in_progress"}},"ResponseFileSearchCallSearchingEvent":{"description":"Emitted when a file search is currently searching.","properties":{"item_id":{"description":"The ID of the output item that the file search call is initiated.\n","type":"string"},"output_index":{"description":"The index of the output item that the file search call is searching.\n","type":"integer"},"sequence_number":{"description":"The sequence number of this event.","type":"integer"},"type":{"description":"The type of the event. Always `response.file_search_call.searching`.\n","enum":["response.file_search_call.searching"],"type":"string","x-stainless-const":true}},"required":["type","output_index","item_id","sequence_number"],"type":"object","x-oaiMeta":{"example":"{\n  \"type\": \"response.file_search_call.searching\",\n  \"output_index\": 0,\n  \"item_id\": \"fs_123\",\n  \"sequence_number\": 1\n}\n","group":"responses","name":"response.file_search_call.searching"}},"ResponseFormatConfig":{"description":"Configuration for the response output format. This is a flat object\nwhere each optional sub-field configures a specific output modality.","properties":{"audio":{"allOf":[{"$ref":"#/components/schemas/GeminiAudioResponseFormat"}],"description":"Optional. Audio output format configuration."},"image":{"allOf":[{"$ref":"#/components/schemas/ImageResponseFormat"}],"description":"Optional. Image output format configuration."},"text":{"allOf":[{"$ref":"#/components/schemas/TextResponseFormat"}],"description":"Optional. Text output format configuration."}},"type":"object"},"ResponseFormatJsonObject":{"description":"JSON object response format. An older method of generating JSON responses.\nUsing `json_schema` is recommended for models that support it. Note that the\nmodel will not generate JSON without a system or user message instructing it\nto do so.\n","properties":{"type":{"description":"The type of response format being defined. Always `json_object`.","enum":["json_object"],"type":"string","x-stainless-const":true}},"required":["type"],"title":"JSON object","type":"object"},"ResponseFormatJsonSchema":{"description":"JSON Schema response format. Used to generate structured JSON responses.\nLearn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs).\n","properties":{"json_schema":{"description":"Structured Outputs configuration options, including a JSON Schema.\n","properties":{"description":{"description":"A description of what the response format is for, used by the model to\ndetermine how to respond in the format.\n","type":"string"},"name":{"description":"The name of the response format. Must be a-z, A-Z, 0-9, or contain\nunderscores and dashes, with a maximum length of 64.\n","type":"string"},"schema":{"$ref":"#/components/schemas/ResponseFormatJsonSchemaSchema"},"strict":{"anyOf":[{"default":false,"description":"Whether to enable strict schema adherence when generating the output.\nIf set to true, the model will always follow the exact schema defined\nin the `schema` field. Only a subset of JSON Schema is supported when\n`strict` is `true`. To learn more, read the [Structured Outputs\nguide](https://platform.openai.com/docs/guides/structured-outputs).\n","type":"boolean"},{"type":"null"}]}},"required":["name"],"title":"JSON schema","type":"object"},"type":{"description":"The type of response format being defined. Always `json_schema`.","enum":["json_schema"],"type":"string","x-stainless-const":true}},"required":["type","json_schema"],"title":"JSON schema","type":"object"},"ResponseFormatJsonSchemaSchema":{"additionalProperties":true,"description":"The schema for the response format, described as a JSON Schema object.\nLearn how to build JSON schemas [here](https://json-schema.org/).\n","title":"JSON schema","type":"object"},"ResponseFormatText":{"description":"Default response format. Used to generate text responses.\n","properties":{"type":{"description":"The type of response format being defined. Always `text`.","enum":["text"],"type":"string","x-stainless-const":true}},"required":["type"],"title":"Text","type":"object"},"ResponseFunctionCallArgumentsDeltaEvent":{"description":"Emitted when there is a partial function-call arguments delta.","properties":{"delta":{"description":"The function-call arguments delta that is added.\n","type":"string"},"item_id":{"description":"The ID of the output item that the function-call arguments delta is added to.\n","type":"string"},"output_index":{"description":"The index of the output item that the function-call arguments delta is added to.\n","type":"integer"},"sequence_number":{"description":"The sequence number of this event.","type":"integer"},"type":{"description":"The type of the event. Always `response.function_call_arguments.delta`.\n","enum":["response.function_call_arguments.delta"],"type":"string","x-stainless-const":true}},"required":["type","item_id","output_index","delta","sequence_number"],"type":"object","x-oaiMeta":{"example":"{\n  \"type\": \"response.function_call_arguments.delta\",\n  \"item_id\": \"item-abc\",\n  \"output_index\": 0,\n  \"delta\": \"{ \\\"arg\\\":\"\n  \"sequence_number\": 1\n}\n","group":"responses","name":"response.function_call_arguments.delta"}},"ResponseFunctionCallArgumentsDoneEvent":{"description":"Emitted when function-call arguments are finalized.","properties":{"arguments":{"description":"The function-call arguments.","type":"string"},"item_id":{"description":"The ID of the item.","type":"string"},"name":{"description":"The name of the function that was called.","type":"string"},"output_index":{"description":"The index of the output item.","type":"integer"},"sequence_number":{"description":"The sequence number of this event.","type":"integer"},"type":{"enum":["response.function_call_arguments.done"],"type":"string","x-stainless-const":true}},"required":["type","item_id","name","output_index","arguments","sequence_number"],"type":"object","x-oaiMeta":{"example":"{\n  \"type\": \"response.function_call_arguments.done\",\n  \"item_id\": \"item-abc\",\n  \"name\": \"get_weather\",\n  \"output_index\": 1,\n  \"arguments\": \"{ \\\"arg\\\": 123 }\",\n  \"sequence_number\": 1\n}\n","group":"responses","name":"response.function_call_arguments.done"}},"ResponseImageGenCallCompletedEvent":{"description":"Emitted when an image generation tool call has completed and the final image is available.\n","properties":{"item_id":{"description":"The unique identifier of the image generation item being processed.","type":"string"},"output_index":{"description":"The index of the output item in the response's output array.","type":"integer"},"sequence_number":{"description":"The sequence number of this event.","type":"integer"},"type":{"description":"The type of the event. Always 'response.image_generation_call.completed'.","enum":["response.image_generation_call.completed"],"type":"string","x-stainless-const":true}},"required":["type","output_index","item_id","sequence_number"],"title":"ResponseImageGenCallCompletedEvent","type":"object","x-oaiMeta":{"example":"{\n  \"type\": \"response.image_generation_call.completed\",\n  \"output_index\": 0,\n  \"item_id\": \"item-123\",\n  \"sequence_number\": 1\n}\n","group":"responses","name":"response.image_generation_call.completed"}},"ResponseImageGenCallGeneratingEvent":{"description":"Emitted when an image generation tool call is actively generating an image (intermediate state).\n","properties":{"item_id":{"description":"The unique identifier of the image generation item being processed.","type":"string"},"output_index":{"description":"The index of the output item in the response's output array.","type":"integer"},"sequence_number":{"description":"The sequence number of the image generation item being processed.","type":"integer"},"type":{"description":"The type of the event. Always 'response.image_generation_call.generating'.","enum":["response.image_generation_call.generating"],"type":"string","x-stainless-const":true}},"required":["type","output_index","item_id","sequence_number"],"title":"ResponseImageGenCallGeneratingEvent","type":"object","x-oaiMeta":{"example":"{\n  \"type\": \"response.image_generation_call.generating\",\n  \"output_index\": 0,\n  \"item_id\": \"item-123\",\n  \"sequence_number\": 0\n}\n","group":"responses","name":"response.image_generation_call.generating"}},"ResponseImageGenCallInProgressEvent":{"description":"Emitted when an image generation tool call is in progress.\n","properties":{"item_id":{"description":"The unique identifier of the image generation item being processed.","type":"string"},"output_index":{"description":"The index of the output item in the response's output array.","type":"integer"},"sequence_number":{"description":"The sequence number of the image generation item being processed.","type":"integer"},"type":{"description":"The type of the event. Always 'response.image_generation_call.in_progress'.","enum":["response.image_generation_call.in_progress"],"type":"string","x-stainless-const":true}},"required":["type","output_index","item_id","sequence_number"],"title":"ResponseImageGenCallInProgressEvent","type":"object","x-oaiMeta":{"example":"{\n  \"type\": \"response.image_generation_call.in_progress\",\n  \"output_index\": 0,\n  \"item_id\": \"item-123\",\n  \"sequence_number\": 0\n}\n","group":"responses","name":"response.image_generation_call.in_progress"}},"ResponseImageGenCallPartialImageEvent":{"description":"Emitted when a partial image is available during image generation streaming.\n","properties":{"item_id":{"description":"The unique identifier of the image generation item being processed.","type":"string"},"output_index":{"description":"The index of the output item in the response's output array.","type":"integer"},"partial_image_b64":{"description":"Base64-encoded partial image data, suitable for rendering as an image.","type":"string"},"partial_image_index":{"description":"0-based index for the partial image (backend is 1-based, but this is 0-based for the user).","type":"integer"},"sequence_number":{"description":"The sequence number of the image generation item being processed.","type":"integer"},"type":{"description":"The type of the event. Always 'response.image_generation_call.partial_image'.","enum":["response.image_generation_call.partial_image"],"type":"string","x-stainless-const":true}},"required":["type","output_index","item_id","sequence_number","partial_image_index","partial_image_b64"],"title":"ResponseImageGenCallPartialImageEvent","type":"object","x-oaiMeta":{"example":"{\n  \"type\": \"response.image_generation_call.partial_image\",\n  \"output_index\": 0,\n  \"item_id\": \"item-123\",\n  \"sequence_number\": 0,\n  \"partial_image_index\": 0,\n  \"partial_image_b64\": \"...\"\n}\n","group":"responses","name":"response.image_generation_call.partial_image"}},"ResponseInProgressEvent":{"description":"Emitted when the response is in progress.","properties":{"response":{"$ref":"#/components/schemas/Response","description":"The response that is in progress.\n"},"sequence_number":{"description":"The sequence number of this event.","type":"integer"},"type":{"description":"The type of the event. Always `response.in_progress`.\n","enum":["response.in_progress"],"type":"string","x-stainless-const":true}},"required":["type","response","sequence_number"],"type":"object","x-oaiMeta":{"example":"{\n  \"type\": \"response.in_progress\",\n  \"response\": {\n    \"id\": \"resp_67ccfcdd16748190a91872c75d38539e09e4d4aac714747c\",\n    \"object\": \"response\",\n    \"created_at\": 1741487325,\n    \"status\": \"in_progress\",\n    \"completed_at\": null,\n    \"error\": null,\n    \"incomplete_details\": null,\n    \"instructions\": null,\n    \"max_output_tokens\": null,\n    \"model\": \"gpt-4o-2024-08-06\",\n    \"output\": [],\n    \"parallel_tool_calls\": true,\n    \"previous_response_id\": null,\n    \"reasoning\": {\n      \"effort\": null,\n      \"summary\": null\n    },\n    \"store\": true,\n    \"temperature\": 1,\n    \"text\": {\n      \"format\": {\n        \"type\": \"text\"\n      }\n    },\n    \"tool_choice\": \"auto\",\n    \"tools\": [],\n    \"top_p\": 1,\n    \"truncation\": \"disabled\",\n    \"usage\": null,\n    \"user\": null,\n    \"metadata\": {}\n  },\n  \"sequence_number\": 1\n}\n","group":"responses","name":"response.in_progress"}},"ResponseIncompleteEvent":{"description":"An event that is emitted when a response finishes as incomplete.\n","properties":{"response":{"$ref":"#/components/schemas/Response","description":"The response that was incomplete.\n"},"sequence_number":{"description":"The sequence number of this event.","type":"integer"},"type":{"description":"The type of the event. Always `response.incomplete`.\n","enum":["response.incomplete"],"type":"string","x-stainless-const":true}},"required":["type","response","sequence_number"],"type":"object","x-oaiMeta":{"example":"{\n  \"type\": \"response.incomplete\",\n  \"response\": {\n    \"id\": \"resp_123\",\n    \"object\": \"response\",\n    \"created_at\": 1740855869,\n    \"status\": \"incomplete\",\n    \"completed_at\": null,\n    \"error\": null,\n    \"incomplete_details\": {\n      \"reason\": \"max_tokens\"\n    },\n    \"instructions\": null,\n    \"max_output_tokens\": null,\n    \"model\": \"gpt-4o-mini-2024-07-18\",\n    \"output\": [],\n    \"previous_response_id\": null,\n    \"reasoning_effort\": null,\n    \"store\": false,\n    \"temperature\": 1,\n    \"text\": {\n      \"format\": {\n        \"type\": \"text\"\n      }\n    },\n    \"tool_choice\": \"auto\",\n    \"tools\": [],\n    \"top_p\": 1,\n    \"truncation\": \"disabled\",\n    \"usage\": null,\n    \"user\": null,\n    \"metadata\": {}\n  },\n  \"sequence_number\": 1\n}\n","group":"responses","name":"response.incomplete"}},"ResponseInputItemsList":{"properties":{"data":{"items":{"$ref":"#/components/schemas/InputItem"},"type":"array"},"first_id":{"nullable":true,"type":"string"},"has_more":{"type":"boolean"},"last_id":{"nullable":true,"type":"string"},"object":{"enum":["list"],"type":"string"}},"required":["object","data","has_more","first_id","last_id"],"type":"object"},"ResponseLogProb":{"description":"A logprob is the logarithmic probability that the model assigns to producing \na particular token at a given position in the sequence. Less-negative (higher) \nlogprob values indicate greater model confidence in that token choice.\n","properties":{"logprob":{"description":"The log probability of this token.\n","type":"number"},"token":{"description":"A possible text token.","type":"string"},"top_logprobs":{"description":"The log probability of the top 20 most likely tokens.\n","items":{"properties":{"logprob":{"description":"The log probability of this token.","type":"number"},"token":{"description":"A possible text token.","type":"string"}},"type":"object"},"type":"array"}},"required":["token","logprob"],"type":"object"},"ResponseMCPCallArgumentsDeltaEvent":{"description":"Emitted when there is a delta (partial update) to the arguments of an MCP tool call.\n","properties":{"delta":{"description":"A JSON string containing the partial update to the arguments for the MCP tool call.\n","type":"string"},"item_id":{"description":"The unique identifier of the MCP tool call item being processed.","type":"string"},"output_index":{"description":"The index of the output item in the response's output array.","type":"integer"},"sequence_number":{"description":"The sequence number of this event.","type":"integer"},"type":{"description":"The type of the event. Always 'response.mcp_call_arguments.delta'.","enum":["response.mcp_call_arguments.delta"],"type":"string","x-stainless-const":true}},"required":["type","output_index","item_id","delta","sequence_number"],"title":"ResponseMCPCallArgumentsDeltaEvent","type":"object","x-oaiMeta":{"example":"{\n  \"type\": \"response.mcp_call_arguments.delta\",\n  \"output_index\": 0,\n  \"item_id\": \"item-abc\",\n  \"delta\": \"{\",\n  \"sequence_number\": 1\n}\n","group":"responses","name":"response.mcp_call_arguments.delta"}},"ResponseMCPCallArgumentsDoneEvent":{"description":"Emitted when the arguments for an MCP tool call are finalized.\n","properties":{"arguments":{"description":"A JSON string containing the finalized arguments for the MCP tool call.\n","type":"string"},"item_id":{"description":"The unique identifier of the MCP tool call item being processed.","type":"string"},"output_index":{"description":"The index of the output item in the response's output array.","type":"integer"},"sequence_number":{"description":"The sequence number of this event.","type":"integer"},"type":{"description":"The type of the event. Always 'response.mcp_call_arguments.done'.","enum":["response.mcp_call_arguments.done"],"type":"string","x-stainless-const":true}},"required":["type","output_index","item_id","arguments","sequence_number"],"title":"ResponseMCPCallArgumentsDoneEvent","type":"object","x-oaiMeta":{"example":"{\n  \"type\": \"response.mcp_call_arguments.done\",\n  \"output_index\": 0,\n  \"item_id\": \"item-abc\",\n  \"arguments\": \"{\\\"arg1\\\": \\\"value1\\\", \\\"arg2\\\": \\\"value2\\\"}\",\n  \"sequence_number\": 1\n}\n","group":"responses","name":"response.mcp_call_arguments.done"}},"ResponseMCPCallCompletedEvent":{"description":"Emitted when an MCP  tool call has completed successfully.\n","properties":{"item_id":{"description":"The ID of the MCP tool call item that completed.","type":"string"},"output_index":{"description":"The index of the output item that completed.","type":"integer"},"sequence_number":{"description":"The sequence number of this event.","type":"integer"},"type":{"description":"The type of the event. Always 'response.mcp_call.completed'.","enum":["response.mcp_call.completed"],"type":"string","x-stainless-const":true}},"required":["type","item_id","output_index","sequence_number"],"title":"ResponseMCPCallCompletedEvent","type":"object","x-oaiMeta":{"example":"{\n  \"type\": \"response.mcp_call.completed\",\n  \"sequence_number\": 1,\n  \"item_id\": \"mcp_682d437d90a88191bf88cd03aae0c3e503937d5f622d7a90\",\n  \"output_index\": 0\n}\n","group":"responses","name":"response.mcp_call.completed"}},"ResponseMCPCallFailedEvent":{"description":"Emitted when an MCP  tool call has failed.\n","properties":{"item_id":{"description":"The ID of the MCP tool call item that failed.","type":"string"},"output_index":{"description":"The index of the output item that failed.","type":"integer"},"sequence_number":{"description":"The sequence number of this event.","type":"integer"},"type":{"description":"The type of the event. Always 'response.mcp_call.failed'.","enum":["response.mcp_call.failed"],"type":"string","x-stainless-const":true}},"required":["type","item_id","output_index","sequence_number"],"title":"ResponseMCPCallFailedEvent","type":"object","x-oaiMeta":{"example":"{\n  \"type\": \"response.mcp_call.failed\",\n  \"sequence_number\": 1,\n  \"item_id\": \"mcp_682d437d90a88191bf88cd03aae0c3e503937d5f622d7a90\",\n  \"output_index\": 0\n}\n","group":"responses","name":"response.mcp_call.failed"}},"ResponseMCPCallInProgressEvent":{"description":"Emitted when an MCP  tool call is in progress.\n","properties":{"item_id":{"description":"The unique identifier of the MCP tool call item being processed.","type":"string"},"output_index":{"description":"The index of the output item in the response's output array.","type":"integer"},"sequence_number":{"description":"The sequence number of this event.","type":"integer"},"type":{"description":"The type of the event. Always 'response.mcp_call.in_progress'.","enum":["response.mcp_call.in_progress"],"type":"string","x-stainless-const":true}},"required":["type","output_index","item_id","sequence_number"],"title":"ResponseMCPCallInProgressEvent","type":"object","x-oaiMeta":{"example":"{\n  \"type\": \"response.mcp_call.in_progress\",\n  \"sequence_number\": 1,\n  \"output_index\": 0,\n  \"item_id\": \"mcp_682d437d90a88191bf88cd03aae0c3e503937d5f622d7a90\"\n}\n","group":"responses","name":"response.mcp_call.in_progress"}},"ResponseMCPListToolsCompletedEvent":{"description":"Emitted when the list of available MCP tools has been successfully retrieved.\n","properties":{"item_id":{"description":"The ID of the MCP tool call item that produced this output.","type":"string"},"output_index":{"description":"The index of the output item that was processed.","type":"integer"},"sequence_number":{"description":"The sequence number of this event.","type":"integer"},"type":{"description":"The type of the event. Always 'response.mcp_list_tools.completed'.","enum":["response.mcp_list_tools.completed"],"type":"string","x-stainless-const":true}},"required":["type","item_id","output_index","sequence_number"],"title":"ResponseMCPListToolsCompletedEvent","type":"object","x-oaiMeta":{"example":"{\n  \"type\": \"response.mcp_list_tools.completed\",\n  \"sequence_number\": 1,\n  \"output_index\": 0,\n  \"item_id\": \"mcpl_682d4379df088191886b70f4ec39f90403937d5f622d7a90\"\n}\n","group":"responses","name":"response.mcp_list_tools.completed"}},"ResponseMCPListToolsFailedEvent":{"description":"Emitted when the attempt to list available MCP tools has failed.\n","properties":{"item_id":{"description":"The ID of the MCP tool call item that failed.","type":"string"},"output_index":{"description":"The index of the output item that failed.","type":"integer"},"sequence_number":{"description":"The sequence number of this event.","type":"integer"},"type":{"description":"The type of the event. Always 'response.mcp_list_tools.failed'.","enum":["response.mcp_list_tools.failed"],"type":"string","x-stainless-const":true}},"required":["type","item_id","output_index","sequence_number"],"title":"ResponseMCPListToolsFailedEvent","type":"object","x-oaiMeta":{"example":"{\n  \"type\": \"response.mcp_list_tools.failed\",\n  \"sequence_number\": 1,\n  \"output_index\": 0,\n  \"item_id\": \"mcpl_682d4379df088191886b70f4ec39f90403937d5f622d7a90\"\n}\n","group":"responses","name":"response.mcp_list_tools.failed"}},"ResponseMCPListToolsInProgressEvent":{"description":"Emitted when the system is in the process of retrieving the list of available MCP tools.\n","properties":{"item_id":{"description":"The ID of the MCP tool call item that is being processed.","type":"string"},"output_index":{"description":"The index of the output item that is being processed.","type":"integer"},"sequence_number":{"description":"The sequence number of this event.","type":"integer"},"type":{"description":"The type of the event. Always 'response.mcp_list_tools.in_progress'.","enum":["response.mcp_list_tools.in_progress"],"type":"string","x-stainless-const":true}},"required":["type","item_id","output_index","sequence_number"],"title":"ResponseMCPListToolsInProgressEvent","type":"object","x-oaiMeta":{"example":"{\n  \"type\": \"response.mcp_list_tools.in_progress\",\n  \"sequence_number\": 1,\n  \"output_index\": 0,\n  \"item_id\": \"mcpl_682d4379df088191886b70f4ec39f90403937d5f622d7a90\"\n}\n","group":"responses","name":"response.mcp_list_tools.in_progress"}},"ResponseModalities":{"anyOf":[{"description":"Output types that you would like the model to generate.\nMost models are capable of generating text, which is the default:\n\n`[\"text\"]`\n\nThe `gpt-4o-audio-preview` model can also be used to\n[generate audio](https://platform.openai.com/docs/guides/audio). To request that this model generate\nboth text and audio responses, you can use:\n\n`[\"text\", \"audio\"]`\n","items":{"enum":["text","audio"],"type":"string"},"type":"array"},{"type":"null"}]},"ResponseOutputItemAddedEvent":{"description":"Emitted when a new output item is added.","properties":{"item":{"$ref":"#/components/schemas/OutputItem","description":"The output item that was added.\n"},"output_index":{"description":"The index of the output item that was added.\n","type":"integer"},"sequence_number":{"description":"The sequence number of this event.\n","type":"integer"},"type":{"description":"The type of the event. Always `response.output_item.added`.\n","enum":["response.output_item.added"],"type":"string","x-stainless-const":true}},"required":["type","output_index","item","sequence_number"],"type":"object","x-oaiMeta":{"example":"{\n  \"type\": \"response.output_item.added\",\n  \"output_index\": 0,\n  \"item\": {\n    \"id\": \"msg_123\",\n    \"status\": \"in_progress\",\n    \"type\": \"message\",\n    \"role\": \"assistant\",\n    \"content\": []\n  },\n  \"sequence_number\": 1\n}\n","group":"responses","name":"response.output_item.added"}},"ResponseOutputItemDoneEvent":{"description":"Emitted when an output item is marked done.","properties":{"item":{"$ref":"#/components/schemas/OutputItem","description":"The output item that was marked done.\n"},"output_index":{"description":"The index of the output item that was marked done.\n","type":"integer"},"sequence_number":{"description":"The sequence number of this event.\n","type":"integer"},"type":{"description":"The type of the event. Always `response.output_item.done`.\n","enum":["response.output_item.done"],"type":"string","x-stainless-const":true}},"required":["type","output_index","item","sequence_number"],"type":"object","x-oaiMeta":{"example":"{\n  \"type\": \"response.output_item.done\",\n  \"output_index\": 0,\n  \"item\": {\n    \"id\": \"msg_123\",\n    \"status\": \"completed\",\n    \"type\": \"message\",\n    \"role\": \"assistant\",\n    \"content\": [\n      {\n        \"type\": \"output_text\",\n        \"text\": \"In a shimmering forest under a sky full of stars, a lonely unicorn named Lila discovered a hidden pond that glowed with moonlight. Every night, she would leave sparkling, magical flowers by the water's edge, hoping to share her beauty with others. One enchanting evening, she woke to find a group of friendly animals gathered around, eager to be friends and share in her magic.\",\n        \"annotations\": []\n      }\n    ]\n  },\n  \"sequence_number\": 1\n}\n","group":"responses","name":"response.output_item.done"}},"ResponseOutputTextAnnotationAddedEvent":{"description":"Emitted when an annotation is added to output text content.\n","properties":{"annotation":{"description":"The annotation object being added. (See annotation schema for details.)","type":"object"},"annotation_index":{"description":"The index of the annotation within the content part.","type":"integer"},"content_index":{"description":"The index of the content part within the output item.","type":"integer"},"item_id":{"description":"The unique identifier of the item to which the annotation is being added.","type":"string"},"output_index":{"description":"The index of the output item in the response's output array.","type":"integer"},"sequence_number":{"description":"The sequence number of this event.","type":"integer"},"type":{"description":"The type of the event. Always 'response.output_text.annotation.added'.","enum":["response.output_text.annotation.added"],"type":"string","x-stainless-const":true}},"required":["type","item_id","output_index","content_index","annotation_index","annotation","sequence_number"],"title":"ResponseOutputTextAnnotationAddedEvent","type":"object","x-oaiMeta":{"example":"{\n  \"type\": \"response.output_text.annotation.added\",\n  \"item_id\": \"item-abc\",\n  \"output_index\": 0,\n  \"content_index\": 0,\n  \"annotation_index\": 0,\n  \"annotation\": {\n    \"type\": \"text_annotation\",\n    \"text\": \"This is a test annotation\",\n    \"start\": 0,\n    \"end\": 10\n  },\n  \"sequence_number\": 1\n}\n","group":"responses","name":"response.output_text.annotation.added"}},"ResponsePageLocationCitation":{"description":"(Deep ref — see upstream Anthropic spec for full definition)","properties":{"type":{"type":"string"}},"required":["type"],"type":"object","x-upstream-stub":true},"ResponsePromptVariables":{"anyOf":[{"additionalProperties":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/InputTextContent"},{"$ref":"#/components/schemas/InputImageContent"},{"$ref":"#/components/schemas/InputFileContent"}],"x-oaiExpandable":true,"x-oaiTypeLabel":"map"},"description":"Optional map of values to substitute in for variables in your\nprompt. The substitution values can either be strings, or other\nResponse input types like images or files.\n","title":"Prompt Variables","type":"object","x-oaiExpandable":true,"x-oaiTypeLabel":"map"},{"type":"null"}]},"ResponseProperties":{"properties":{"background":{"anyOf":[{"default":false,"description":"Whether to run the model response in the background.\n[Learn more](https://platform.openai.com/docs/guides/background).\n","type":"boolean"},{"type":"null"}]},"max_output_tokens":{"anyOf":[{"description":"An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](https://platform.openai.com/docs/guides/reasoning).\n","type":"integer"},{"type":"null"}]},"max_tool_calls":{"anyOf":[{"description":"The maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per individual tool. Any further attempts to call a tool by the model will be ignored.\n","type":"integer"},{"type":"null"}]},"model":{"$ref":"#/components/schemas/ModelIdsResponses","description":"Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI\noffers a wide range of models with different capabilities, performance\ncharacteristics, and latency profiles. Refer to the [model guide](https://platform.openai.com/docs/models)\nto browse and compare available models.\n"},"previous_response_id":{"anyOf":[{"description":"The unique ID of the previous response to the model. Use this to\ncreate multi-turn conversations. Learn more about\n[conversation state](https://platform.openai.com/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`.\n","type":"string"},{"type":"null"}]},"prompt":{"$ref":"#/components/schemas/Prompt"},"reasoning":{"anyOf":[{"$ref":"#/components/schemas/Reasoning"},{"type":"null"}]},"text":{"$ref":"#/components/schemas/ResponseTextParam"},"tool_choice":{"$ref":"#/components/schemas/ToolChoiceParam"},"tools":{"$ref":"#/components/schemas/ToolsArray"},"truncation":{"anyOf":[{"default":"disabled","description":"The truncation strategy to use for the model response.\n- `auto`: If the input to this Response exceeds\n  the model's context window size, the model will truncate the\n  response to fit the context window by dropping items from the beginning of the conversation.\n- `disabled` (default): If the input size will exceed the context window\n  size for a model, the request will fail with a 400 error.\n","enum":["auto","disabled"],"type":"string"},{"type":"null"}]}},"type":"object"},"ResponseQueuedEvent":{"description":"Emitted when a response is queued and waiting to be processed.\n","properties":{"response":{"$ref":"#/components/schemas/Response","description":"The full response object that is queued."},"sequence_number":{"description":"The sequence number for this event.","type":"integer"},"type":{"description":"The type of the event. Always 'response.queued'.","enum":["response.queued"],"type":"string","x-stainless-const":true}},"required":["type","response","sequence_number"],"title":"ResponseQueuedEvent","type":"object","x-oaiMeta":{"example":"{\n  \"type\": \"response.queued\",\n  \"response\": {\n    \"id\": \"res_123\",\n    \"status\": \"queued\",\n    \"created_at\": \"2021-01-01T00:00:00Z\",\n    \"updated_at\": \"2021-01-01T00:00:00Z\"\n  },\n  \"sequence_number\": 1\n}\n","group":"responses","name":"response.queued"}},"ResponseReasoningSummaryPartAddedEvent":{"description":"Emitted when a new reasoning summary part is added.","properties":{"item_id":{"description":"The ID of the item this summary part is associated with.\n","type":"string"},"output_index":{"description":"The index of the output item this summary part is associated with.\n","type":"integer"},"part":{"description":"The summary part that was added.\n","properties":{"text":{"description":"The text of the summary part.","type":"string"},"type":{"description":"The type of the summary part. Always `summary_text`.","enum":["summary_text"],"type":"string","x-stainless-const":true}},"required":["type","text"],"type":"object"},"sequence_number":{"description":"The sequence number of this event.\n","type":"integer"},"summary_index":{"description":"The index of the summary part within the reasoning summary.\n","type":"integer"},"type":{"description":"The type of the event. Always `response.reasoning_summary_part.added`.\n","enum":["response.reasoning_summary_part.added"],"type":"string","x-stainless-const":true}},"required":["type","item_id","output_index","summary_index","part","sequence_number"],"type":"object","x-oaiMeta":{"example":"{\n  \"type\": \"response.reasoning_summary_part.added\",\n  \"item_id\": \"rs_6806bfca0b2481918a5748308061a2600d3ce51bdffd5476\",\n  \"output_index\": 0,\n  \"summary_index\": 0,\n  \"part\": {\n    \"type\": \"summary_text\",\n    \"text\": \"\"\n  },\n  \"sequence_number\": 1\n}\n","group":"responses","name":"response.reasoning_summary_part.added"}},"ResponseReasoningSummaryPartDoneEvent":{"description":"Emitted when a reasoning summary part is completed.","properties":{"item_id":{"description":"The ID of the item this summary part is associated with.\n","type":"string"},"output_index":{"description":"The index of the output item this summary part is associated with.\n","type":"integer"},"part":{"description":"The completed summary part.\n","properties":{"text":{"description":"The text of the summary part.","type":"string"},"type":{"description":"The type of the summary part. Always `summary_text`.","enum":["summary_text"],"type":"string","x-stainless-const":true}},"required":["type","text"],"type":"object"},"sequence_number":{"description":"The sequence number of this event.\n","type":"integer"},"summary_index":{"description":"The index of the summary part within the reasoning summary.\n","type":"integer"},"type":{"description":"The type of the event. Always `response.reasoning_summary_part.done`.\n","enum":["response.reasoning_summary_part.done"],"type":"string","x-stainless-const":true}},"required":["type","item_id","output_index","summary_index","part","sequence_number"],"type":"object","x-oaiMeta":{"example":"{\n  \"type\": \"response.reasoning_summary_part.done\",\n  \"item_id\": \"rs_6806bfca0b2481918a5748308061a2600d3ce51bdffd5476\",\n  \"output_index\": 0,\n  \"summary_index\": 0,\n  \"part\": {\n    \"type\": \"summary_text\",\n    \"text\": \"**Responding to a greeting**\\n\\nThe user just said, \\\"Hello!\\\" So, it seems I need to engage. I'll greet them back and offer help since they're looking to chat. I could say something like, \\\"Hello! How can I assist you today?\\\" That feels friendly and open. They didn't ask a specific question, so this approach will work well for starting a conversation. Let's see where it goes from there!\"\n  },\n  \"sequence_number\": 1\n}\n","group":"responses","name":"response.reasoning_summary_part.done"}},"ResponseReasoningSummaryTextDeltaEvent":{"description":"Emitted when a delta is added to a reasoning summary text.","properties":{"delta":{"description":"The text delta that was added to the summary.\n","type":"string"},"item_id":{"description":"The ID of the item this summary text delta is associated with.\n","type":"string"},"output_index":{"description":"The index of the output item this summary text delta is associated with.\n","type":"integer"},"sequence_number":{"description":"The sequence number of this event.\n","type":"integer"},"summary_index":{"description":"The index of the summary part within the reasoning summary.\n","type":"integer"},"type":{"description":"The type of the event. Always `response.reasoning_summary_text.delta`.\n","enum":["response.reasoning_summary_text.delta"],"type":"string","x-stainless-const":true}},"required":["type","item_id","output_index","summary_index","delta","sequence_number"],"type":"object","x-oaiMeta":{"example":"{\n  \"type\": \"response.reasoning_summary_text.delta\",\n  \"item_id\": \"rs_6806bfca0b2481918a5748308061a2600d3ce51bdffd5476\",\n  \"output_index\": 0,\n  \"summary_index\": 0,\n  \"delta\": \"**Responding to a greeting**\\n\\nThe user just said, \\\"Hello!\\\" So, it seems I need to engage. I'll greet them back and offer help since they're looking to chat. I could say something like, \\\"Hello! How can I assist you today?\\\" That feels friendly and open. They didn't ask a specific question, so this approach will work well for starting a conversation. Let's see where it goes from there!\",\n  \"sequence_number\": 1\n}\n","group":"responses","name":"response.reasoning_summary_text.delta"}},"ResponseReasoningSummaryTextDoneEvent":{"description":"Emitted when a reasoning summary text is completed.","properties":{"item_id":{"description":"The ID of the item this summary text is associated with.\n","type":"string"},"output_index":{"description":"The index of the output item this summary text is associated with.\n","type":"integer"},"sequence_number":{"description":"The sequence number of this event.\n","type":"integer"},"summary_index":{"description":"The index of the summary part within the reasoning summary.\n","type":"integer"},"text":{"description":"The full text of the completed reasoning summary.\n","type":"string"},"type":{"description":"The type of the event. Always `response.reasoning_summary_text.done`.\n","enum":["response.reasoning_summary_text.done"],"type":"string","x-stainless-const":true}},"required":["type","item_id","output_index","summary_index","text","sequence_number"],"type":"object","x-oaiMeta":{"example":"{\n  \"type\": \"response.reasoning_summary_text.done\",\n  \"item_id\": \"rs_6806bfca0b2481918a5748308061a2600d3ce51bdffd5476\",\n  \"output_index\": 0,\n  \"summary_index\": 0,\n  \"text\": \"**Responding to a greeting**\\n\\nThe user just said, \\\"Hello!\\\" So, it seems I need to engage. I'll greet them back and offer help since they're looking to chat. I could say something like, \\\"Hello! How can I assist you today?\\\" That feels friendly and open. They didn't ask a specific question, so this approach will work well for starting a conversation. Let's see where it goes from there!\",\n  \"sequence_number\": 1\n}\n","group":"responses","name":"response.reasoning_summary_text.done"}},"ResponseReasoningTextDeltaEvent":{"description":"Emitted when a delta is added to a reasoning text.","properties":{"content_index":{"description":"The index of the reasoning content part this delta is associated with.\n","type":"integer"},"delta":{"description":"The text delta that was added to the reasoning content.\n","type":"string"},"item_id":{"description":"The ID of the item this reasoning text delta is associated with.\n","type":"string"},"output_index":{"description":"The index of the output item this reasoning text delta is associated with.\n","type":"integer"},"sequence_number":{"description":"The sequence number of this event.\n","type":"integer"},"type":{"description":"The type of the event. Always `response.reasoning_text.delta`.\n","enum":["response.reasoning_text.delta"],"type":"string","x-stainless-const":true}},"required":["type","item_id","output_index","content_index","delta","sequence_number"],"type":"object","x-oaiMeta":{"example":"{\n  \"type\": \"response.reasoning_text.delta\",\n  \"item_id\": \"rs_123\",\n  \"output_index\": 0,\n  \"content_index\": 0,\n  \"delta\": \"The\",\n  \"sequence_number\": 1\n}\n","group":"responses","name":"response.reasoning_text.delta"}},"ResponseReasoningTextDoneEvent":{"description":"Emitted when a reasoning text is completed.","properties":{"content_index":{"description":"The index of the reasoning content part.\n","type":"integer"},"item_id":{"description":"The ID of the item this reasoning text is associated with.\n","type":"string"},"output_index":{"description":"The index of the output item this reasoning text is associated with.\n","type":"integer"},"sequence_number":{"description":"The sequence number of this event.\n","type":"integer"},"text":{"description":"The full text of the completed reasoning content.\n","type":"string"},"type":{"description":"The type of the event. Always `response.reasoning_text.done`.\n","enum":["response.reasoning_text.done"],"type":"string","x-stainless-const":true}},"required":["type","item_id","output_index","content_index","text","sequence_number"],"type":"object","x-oaiMeta":{"example":"{\n  \"type\": \"response.reasoning_text.done\",\n  \"item_id\": \"rs_123\",\n  \"output_index\": 0,\n  \"content_index\": 0,\n  \"text\": \"The user is asking...\",\n  \"sequence_number\": 4\n}\n","group":"responses","name":"response.reasoning_text.done"}},"ResponseRedactedThinkingBlock":{"properties":{"data":{"title":"Data","type":"string"},"type":{"const":"redacted_thinking","default":"redacted_thinking","title":"Type","type":"string"}},"required":["data","type"],"title":"ResponseRedactedThinkingBlock","type":"object"},"ResponseRefusalDeltaEvent":{"description":"Emitted when there is a partial refusal text.","properties":{"content_index":{"description":"The index of the content part that the refusal text is added to.\n","type":"integer"},"delta":{"description":"The refusal text that is added.\n","type":"string"},"item_id":{"description":"The ID of the output item that the refusal text is added to.\n","type":"string"},"output_index":{"description":"The index of the output item that the refusal text is added to.\n","type":"integer"},"sequence_number":{"description":"The sequence number of this event.\n","type":"integer"},"type":{"description":"The type of the event. Always `response.refusal.delta`.\n","enum":["response.refusal.delta"],"type":"string","x-stainless-const":true}},"required":["type","item_id","output_index","content_index","delta","sequence_number"],"type":"object","x-oaiMeta":{"example":"{\n  \"type\": \"response.refusal.delta\",\n  \"item_id\": \"msg_123\",\n  \"output_index\": 0,\n  \"content_index\": 0,\n  \"delta\": \"refusal text so far\",\n  \"sequence_number\": 1\n}\n","group":"responses","name":"response.refusal.delta"}},"ResponseRefusalDoneEvent":{"description":"Emitted when refusal text is finalized.","properties":{"content_index":{"description":"The index of the content part that the refusal text is finalized.\n","type":"integer"},"item_id":{"description":"The ID of the output item that the refusal text is finalized.\n","type":"string"},"output_index":{"description":"The index of the output item that the refusal text is finalized.\n","type":"integer"},"refusal":{"description":"The refusal text that is finalized.\n","type":"string"},"sequence_number":{"description":"The sequence number of this event.\n","type":"integer"},"type":{"description":"The type of the event. Always `response.refusal.done`.\n","enum":["response.refusal.done"],"type":"string","x-stainless-const":true}},"required":["type","item_id","output_index","content_index","refusal","sequence_number"],"type":"object","x-oaiMeta":{"example":"{\n  \"type\": \"response.refusal.done\",\n  \"item_id\": \"item-abc\",\n  \"output_index\": 1,\n  \"content_index\": 2,\n  \"refusal\": \"final refusal text\",\n  \"sequence_number\": 1\n}\n","group":"responses","name":"response.refusal.done"}},"ResponseSearchResultLocationCitation":{"description":"(Deep ref — see upstream Anthropic spec for full definition)","properties":{"type":{"type":"string"}},"required":["type"],"type":"object","x-upstream-stub":true},"ResponseServerToolUseBlock":{"properties":{"caller":{"default":{"type":"direct"},"discriminator":{"mapping":{"code_execution_20250825":"#/components/schemas/ServerToolCaller","code_execution_20260120":"#/components/schemas/ServerToolCaller_20260120","direct":"#/components/schemas/DirectCaller"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/DirectCaller"},{"$ref":"#/components/schemas/ServerToolCaller"},{"$ref":"#/components/schemas/ServerToolCaller_20260120"}],"title":"Caller"},"id":{"pattern":"^srvtoolu_[a-zA-Z0-9_]+$","title":"Id","type":"string"},"input":{"additionalProperties":true,"title":"Input","type":"object"},"name":{"enum":["web_search","web_fetch","code_execution","bash_code_execution","text_editor_code_execution","tool_search_tool_regex","tool_search_tool_bm25"],"title":"Name","type":"string"},"type":{"const":"server_tool_use","default":"server_tool_use","title":"Type","type":"string"}},"required":["caller","id","input","name","type"],"title":"ResponseServerToolUseBlock","type":"object"},"ResponseStreamEvent":{"anyOf":[{"$ref":"#/components/schemas/ResponseAudioDeltaEvent"},{"$ref":"#/components/schemas/ResponseAudioDoneEvent"},{"$ref":"#/components/schemas/ResponseAudioTranscriptDeltaEvent"},{"$ref":"#/components/schemas/ResponseAudioTranscriptDoneEvent"},{"$ref":"#/components/schemas/ResponseCodeInterpreterCallCodeDeltaEvent"},{"$ref":"#/components/schemas/ResponseCodeInterpreterCallCodeDoneEvent"},{"$ref":"#/components/schemas/ResponseCodeInterpreterCallCompletedEvent"},{"$ref":"#/components/schemas/ResponseCodeInterpreterCallInProgressEvent"},{"$ref":"#/components/schemas/ResponseCodeInterpreterCallInterpretingEvent"},{"$ref":"#/components/schemas/ResponseCompletedEvent"},{"$ref":"#/components/schemas/ResponseContentPartAddedEvent"},{"$ref":"#/components/schemas/ResponseContentPartDoneEvent"},{"$ref":"#/components/schemas/ResponseCreatedEvent"},{"$ref":"#/components/schemas/ResponseErrorEvent"},{"$ref":"#/components/schemas/ResponseFileSearchCallCompletedEvent"},{"$ref":"#/components/schemas/ResponseFileSearchCallInProgressEvent"},{"$ref":"#/components/schemas/ResponseFileSearchCallSearchingEvent"},{"$ref":"#/components/schemas/ResponseFunctionCallArgumentsDeltaEvent"},{"$ref":"#/components/schemas/ResponseFunctionCallArgumentsDoneEvent"},{"$ref":"#/components/schemas/ResponseInProgressEvent"},{"$ref":"#/components/schemas/ResponseFailedEvent"},{"$ref":"#/components/schemas/ResponseIncompleteEvent"},{"$ref":"#/components/schemas/ResponseOutputItemAddedEvent"},{"$ref":"#/components/schemas/ResponseOutputItemDoneEvent"},{"$ref":"#/components/schemas/ResponseReasoningSummaryPartAddedEvent"},{"$ref":"#/components/schemas/ResponseReasoningSummaryPartDoneEvent"},{"$ref":"#/components/schemas/ResponseReasoningSummaryTextDeltaEvent"},{"$ref":"#/components/schemas/ResponseReasoningSummaryTextDoneEvent"},{"$ref":"#/components/schemas/ResponseReasoningTextDeltaEvent"},{"$ref":"#/components/schemas/ResponseReasoningTextDoneEvent"},{"$ref":"#/components/schemas/ResponseRefusalDeltaEvent"},{"$ref":"#/components/schemas/ResponseRefusalDoneEvent"},{"$ref":"#/components/schemas/ResponseTextDeltaEvent"},{"$ref":"#/components/schemas/ResponseTextDoneEvent"},{"$ref":"#/components/schemas/ResponseWebSearchCallCompletedEvent"},{"$ref":"#/components/schemas/ResponseWebSearchCallInProgressEvent"},{"$ref":"#/components/schemas/ResponseWebSearchCallSearchingEvent"},{"$ref":"#/components/schemas/ResponseImageGenCallCompletedEvent"},{"$ref":"#/components/schemas/ResponseImageGenCallGeneratingEvent"},{"$ref":"#/components/schemas/ResponseImageGenCallInProgressEvent"},{"$ref":"#/components/schemas/ResponseImageGenCallPartialImageEvent"},{"$ref":"#/components/schemas/ResponseMCPCallArgumentsDeltaEvent"},{"$ref":"#/components/schemas/ResponseMCPCallArgumentsDoneEvent"},{"$ref":"#/components/schemas/ResponseMCPCallCompletedEvent"},{"$ref":"#/components/schemas/ResponseMCPCallFailedEvent"},{"$ref":"#/components/schemas/ResponseMCPCallInProgressEvent"},{"$ref":"#/components/schemas/ResponseMCPListToolsCompletedEvent"},{"$ref":"#/components/schemas/ResponseMCPListToolsFailedEvent"},{"$ref":"#/components/schemas/ResponseMCPListToolsInProgressEvent"},{"$ref":"#/components/schemas/ResponseOutputTextAnnotationAddedEvent"},{"$ref":"#/components/schemas/ResponseQueuedEvent"},{"$ref":"#/components/schemas/ResponseCustomToolCallInputDeltaEvent"},{"$ref":"#/components/schemas/ResponseCustomToolCallInputDoneEvent"}],"discriminator":{"mapping":{"error":"#/components/schemas/ResponseErrorEvent","response.audio.delta":"#/components/schemas/ResponseAudioDeltaEvent","response.audio.done":"#/components/schemas/ResponseAudioDoneEvent","response.audio.transcript.delta":"#/components/schemas/ResponseAudioTranscriptDeltaEvent","response.audio.transcript.done":"#/components/schemas/ResponseAudioTranscriptDoneEvent","response.code_interpreter_call.completed":"#/components/schemas/ResponseCodeInterpreterCallCompletedEvent","response.code_interpreter_call.in_progress":"#/components/schemas/ResponseCodeInterpreterCallInProgressEvent","response.code_interpreter_call.interpreting":"#/components/schemas/ResponseCodeInterpreterCallInterpretingEvent","response.code_interpreter_call_code.delta":"#/components/schemas/ResponseCodeInterpreterCallCodeDeltaEvent","response.code_interpreter_call_code.done":"#/components/schemas/ResponseCodeInterpreterCallCodeDoneEvent","response.completed":"#/components/schemas/ResponseCompletedEvent","response.content_part.added":"#/components/schemas/ResponseContentPartAddedEvent","response.content_part.done":"#/components/schemas/ResponseContentPartDoneEvent","response.created":"#/components/schemas/ResponseCreatedEvent","response.custom_tool_call_input.delta":"#/components/schemas/ResponseCustomToolCallInputDeltaEvent","response.custom_tool_call_input.done":"#/components/schemas/ResponseCustomToolCallInputDoneEvent","response.failed":"#/components/schemas/ResponseFailedEvent","response.file_search_call.completed":"#/components/schemas/ResponseFileSearchCallCompletedEvent","response.file_search_call.in_progress":"#/components/schemas/ResponseFileSearchCallInProgressEvent","response.file_search_call.searching":"#/components/schemas/ResponseFileSearchCallSearchingEvent","response.function_call_arguments.delta":"#/components/schemas/ResponseFunctionCallArgumentsDeltaEvent","response.function_call_arguments.done":"#/components/schemas/ResponseFunctionCallArgumentsDoneEvent","response.image_generation_call.completed":"#/components/schemas/ResponseImageGenCallCompletedEvent","response.image_generation_call.generating":"#/components/schemas/ResponseImageGenCallGeneratingEvent","response.image_generation_call.in_progress":"#/components/schemas/ResponseImageGenCallInProgressEvent","response.image_generation_call.partial_image":"#/components/schemas/ResponseImageGenCallPartialImageEvent","response.in_progress":"#/components/schemas/ResponseInProgressEvent","response.incomplete":"#/components/schemas/ResponseIncompleteEvent","response.mcp_call.completed":"#/components/schemas/ResponseMCPCallCompletedEvent","response.mcp_call.failed":"#/components/schemas/ResponseMCPCallFailedEvent","response.mcp_call.in_progress":"#/components/schemas/ResponseMCPCallInProgressEvent","response.mcp_call_arguments.delta":"#/components/schemas/ResponseMCPCallArgumentsDeltaEvent","response.mcp_call_arguments.done":"#/components/schemas/ResponseMCPCallArgumentsDoneEvent","response.mcp_list_tools.completed":"#/components/schemas/ResponseMCPListToolsCompletedEvent","response.mcp_list_tools.failed":"#/components/schemas/ResponseMCPListToolsFailedEvent","response.mcp_list_tools.in_progress":"#/components/schemas/ResponseMCPListToolsInProgressEvent","response.output_item.added":"#/components/schemas/ResponseOutputItemAddedEvent","response.output_item.done":"#/components/schemas/ResponseOutputItemDoneEvent","response.output_text.annotation.added":"#/components/schemas/ResponseOutputTextAnnotationAddedEvent","response.output_text.delta":"#/components/schemas/ResponseTextDeltaEvent","response.output_text.done":"#/components/schemas/ResponseTextDoneEvent","response.queued":"#/components/schemas/ResponseQueuedEvent","response.reasoning_summary_part.added":"#/components/schemas/ResponseReasoningSummaryPartAddedEvent","response.reasoning_summary_part.done":"#/components/schemas/ResponseReasoningSummaryPartDoneEvent","response.reasoning_summary_text.delta":"#/components/schemas/ResponseReasoningSummaryTextDeltaEvent","response.reasoning_summary_text.done":"#/components/schemas/ResponseReasoningSummaryTextDoneEvent","response.reasoning_text.delta":"#/components/schemas/ResponseReasoningTextDeltaEvent","response.reasoning_text.done":"#/components/schemas/ResponseReasoningTextDoneEvent","response.refusal.delta":"#/components/schemas/ResponseRefusalDeltaEvent","response.refusal.done":"#/components/schemas/ResponseRefusalDoneEvent","response.web_search_call.completed":"#/components/schemas/ResponseWebSearchCallCompletedEvent","response.web_search_call.in_progress":"#/components/schemas/ResponseWebSearchCallInProgressEvent","response.web_search_call.searching":"#/components/schemas/ResponseWebSearchCallSearchingEvent"},"propertyName":"type"}},"ResponseStreamOptions":{"anyOf":[{"default":null,"description":"Options for streaming responses. Only set this when you set `stream: true`.\n","properties":{"include_obfuscation":{"description":"When true, stream obfuscation will be enabled. Stream obfuscation adds\nrandom characters to an `obfuscation` field on streaming delta events to\nnormalize payload sizes as a mitigation to certain side-channel attacks.\nThese obfuscation fields are included by default, but add a small amount\nof overhead to the data stream. You can set `include_obfuscation` to\nfalse to optimize for bandwidth if you trust the network links between\nyour application and the OpenAI API.\n","type":"boolean"}},"type":"object"},{"type":"null"}]},"ResponseTextBlock":{"properties":{"citations":{"anyOf":[{"items":{"discriminator":{"mapping":{"char_location":"#/components/schemas/ResponseCharLocationCitation","content_block_location":"#/components/schemas/ResponseContentBlockLocationCitation","page_location":"#/components/schemas/ResponsePageLocationCitation","search_result_location":"#/components/schemas/ResponseSearchResultLocationCitation","web_search_result_location":"#/components/schemas/ResponseWebSearchResultLocationCitation"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/ResponseCharLocationCitation"},{"$ref":"#/components/schemas/ResponsePageLocationCitation"},{"$ref":"#/components/schemas/ResponseContentBlockLocationCitation"},{"$ref":"#/components/schemas/ResponseWebSearchResultLocationCitation"},{"$ref":"#/components/schemas/ResponseSearchResultLocationCitation"}]},"type":"array"},{"type":"null"}],"default":null,"description":"Citations supporting the text block.\n\nThe type of citation returned will depend on the type of document being cited. Citing a PDF results in `page_location`, plain text results in `char_location`, and content document results in `content_block_location`.","title":"Citations"},"text":{"maxLength":5000000,"minLength":0,"title":"Text","type":"string"},"type":{"const":"text","default":"text","title":"Type","type":"string"}},"required":["citations","text","type"],"title":"ResponseTextBlock","type":"object"},"ResponseTextDeltaEvent":{"description":"Emitted when there is an additional text delta.","properties":{"content_index":{"description":"The index of the content part that the text delta was added to.\n","type":"integer"},"delta":{"description":"The text delta that was added.\n","type":"string"},"item_id":{"description":"The ID of the output item that the text delta was added to.\n","type":"string"},"logprobs":{"description":"The log probabilities of the tokens in the delta.\n","items":{"$ref":"#/components/schemas/ResponseLogProb"},"type":"array"},"output_index":{"description":"The index of the output item that the text delta was added to.\n","type":"integer"},"sequence_number":{"description":"The sequence number for this event.","type":"integer"},"type":{"description":"The type of the event. Always `response.output_text.delta`.\n","enum":["response.output_text.delta"],"type":"string","x-stainless-const":true}},"required":["type","item_id","output_index","content_index","delta","sequence_number","logprobs"],"type":"object","x-oaiMeta":{"example":"{\n  \"type\": \"response.output_text.delta\",\n  \"item_id\": \"msg_123\",\n  \"output_index\": 0,\n  \"content_index\": 0,\n  \"delta\": \"In\",\n  \"sequence_number\": 1\n}\n","group":"responses","name":"response.output_text.delta"}},"ResponseTextDoneEvent":{"description":"Emitted when text content is finalized.","properties":{"content_index":{"description":"The index of the content part that the text content is finalized.\n","type":"integer"},"item_id":{"description":"The ID of the output item that the text content is finalized.\n","type":"string"},"logprobs":{"description":"The log probabilities of the tokens in the delta.\n","items":{"$ref":"#/components/schemas/ResponseLogProb"},"type":"array"},"output_index":{"description":"The index of the output item that the text content is finalized.\n","type":"integer"},"sequence_number":{"description":"The sequence number for this event.","type":"integer"},"text":{"description":"The text content that is finalized.\n","type":"string"},"type":{"description":"The type of the event. Always `response.output_text.done`.\n","enum":["response.output_text.done"],"type":"string","x-stainless-const":true}},"required":["type","item_id","output_index","content_index","text","sequence_number","logprobs"],"type":"object","x-oaiMeta":{"example":"{\n  \"type\": \"response.output_text.done\",\n  \"item_id\": \"msg_123\",\n  \"output_index\": 0,\n  \"content_index\": 0,\n  \"text\": \"In a shimmering forest under a sky full of stars, a lonely unicorn named Lila discovered a hidden pond that glowed with moonlight. Every night, she would leave sparkling, magical flowers by the water's edge, hoping to share her beauty with others. One enchanting evening, she woke to find a group of friendly animals gathered around, eager to be friends and share in her magic.\",\n  \"sequence_number\": 1\n}\n","group":"responses","name":"response.output_text.done"}},"ResponseTextEditorCodeExecutionCreateResultBlock":{"description":"(Deep ref — see upstream Anthropic spec for full definition)","type":"object","x-upstream-stub":true},"ResponseTextEditorCodeExecutionStrReplaceResultBlock":{"description":"(Deep ref — see upstream Anthropic spec for full definition)","type":"object","x-upstream-stub":true},"ResponseTextEditorCodeExecutionToolResultBlock":{"properties":{"content":{"anyOf":[{"$ref":"#/components/schemas/ResponseTextEditorCodeExecutionToolResultError"},{"$ref":"#/components/schemas/ResponseTextEditorCodeExecutionViewResultBlock"},{"$ref":"#/components/schemas/ResponseTextEditorCodeExecutionCreateResultBlock"},{"$ref":"#/components/schemas/ResponseTextEditorCodeExecutionStrReplaceResultBlock"}],"title":"Content"},"tool_use_id":{"pattern":"^srvtoolu_[a-zA-Z0-9_]+$","title":"Tool Use Id","type":"string"},"type":{"const":"text_editor_code_execution_tool_result","default":"text_editor_code_execution_tool_result","title":"Type","type":"string"}},"required":["content","tool_use_id","type"],"title":"ResponseTextEditorCodeExecutionToolResultBlock","type":"object"},"ResponseTextEditorCodeExecutionToolResultError":{"description":"(Deep ref — see upstream Anthropic spec for full definition)","type":"object","x-upstream-stub":true},"ResponseTextEditorCodeExecutionViewResultBlock":{"description":"(Deep ref — see upstream Anthropic spec for full definition)","type":"object","x-upstream-stub":true},"ResponseTextParam":{"description":"Configuration options for a text response from the model. Can be plain\ntext or structured JSON data. Learn more:\n- [Text inputs and outputs](https://platform.openai.com/docs/guides/text)\n- [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)\n","properties":{"format":{"$ref":"#/components/schemas/TextResponseFormatConfiguration"},"verbosity":{"$ref":"#/components/schemas/Verbosity"}},"type":"object"},"ResponseThinkingBlock":{"properties":{"signature":{"title":"Signature","type":"string"},"thinking":{"title":"Thinking","type":"string"},"type":{"const":"thinking","default":"thinking","title":"Type","type":"string"}},"required":["signature","thinking","type"],"title":"ResponseThinkingBlock","type":"object"},"ResponseToolSearchToolResultBlock":{"properties":{"content":{"anyOf":[{"$ref":"#/components/schemas/ResponseToolSearchToolResultError"},{"$ref":"#/components/schemas/ResponseToolSearchToolSearchResultBlock"}],"title":"Content"},"tool_use_id":{"pattern":"^srvtoolu_[a-zA-Z0-9_]+$","title":"Tool Use Id","type":"string"},"type":{"const":"tool_search_tool_result","default":"tool_search_tool_result","title":"Type","type":"string"}},"required":["content","tool_use_id","type"],"title":"ResponseToolSearchToolResultBlock","type":"object"},"ResponseToolSearchToolResultError":{"description":"(Deep ref — see upstream Anthropic spec for full definition)","type":"object","x-upstream-stub":true},"ResponseToolSearchToolSearchResultBlock":{"description":"(Deep ref — see upstream Anthropic spec for full definition)","type":"object","x-upstream-stub":true},"ResponseToolUseBlock":{"properties":{"caller":{"default":{"type":"direct"},"discriminator":{"mapping":{"code_execution_20250825":"#/components/schemas/ServerToolCaller","code_execution_20260120":"#/components/schemas/ServerToolCaller_20260120","direct":"#/components/schemas/DirectCaller"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/DirectCaller"},{"$ref":"#/components/schemas/ServerToolCaller"},{"$ref":"#/components/schemas/ServerToolCaller_20260120"}],"title":"Caller"},"id":{"pattern":"^[a-zA-Z0-9_-]+$","title":"Id","type":"string"},"input":{"additionalProperties":true,"title":"Input","type":"object"},"name":{"minLength":1,"title":"Name","type":"string"},"type":{"const":"tool_use","default":"tool_use","title":"Type","type":"string"}},"required":["caller","id","input","name","type"],"title":"ResponseToolUseBlock","type":"object"},"ResponseUsage":{"description":"Represents token usage details including input tokens, output tokens,\na breakdown of output tokens, and the total tokens used.\n","properties":{"input_tokens":{"description":"The number of input tokens.","type":"integer"},"input_tokens_details":{"description":"A detailed breakdown of the input tokens.","properties":{"cached_tokens":{"description":"The number of tokens that were retrieved from the cache. \n[More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching).\n","type":"integer"}},"required":["cached_tokens"],"type":"object"},"output_tokens":{"description":"The number of output tokens.","type":"integer"},"output_tokens_details":{"description":"A detailed breakdown of the output tokens.","properties":{"reasoning_tokens":{"description":"The number of reasoning tokens.","type":"integer"}},"required":["reasoning_tokens"],"type":"object"},"total_tokens":{"description":"The total number of tokens used.","type":"integer"}},"required":["input_tokens","input_tokens_details","output_tokens","output_tokens_details","total_tokens"],"type":"object"},"ResponseWebFetchResultBlock":{"description":"(Deep ref — see upstream Anthropic spec for full definition)","type":"object","x-upstream-stub":true},"ResponseWebFetchToolResultBlock":{"properties":{"caller":{"default":{"type":"direct"},"discriminator":{"mapping":{"code_execution_20250825":"#/components/schemas/ServerToolCaller","code_execution_20260120":"#/components/schemas/ServerToolCaller_20260120","direct":"#/components/schemas/DirectCaller"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/DirectCaller"},{"$ref":"#/components/schemas/ServerToolCaller"},{"$ref":"#/components/schemas/ServerToolCaller_20260120"}],"title":"Caller"},"content":{"anyOf":[{"$ref":"#/components/schemas/ResponseWebFetchToolResultError"},{"$ref":"#/components/schemas/ResponseWebFetchResultBlock"}],"title":"Content"},"tool_use_id":{"pattern":"^srvtoolu_[a-zA-Z0-9_]+$","title":"Tool Use Id","type":"string"},"type":{"const":"web_fetch_tool_result","default":"web_fetch_tool_result","title":"Type","type":"string"}},"required":["caller","content","tool_use_id","type"],"title":"ResponseWebFetchToolResultBlock","type":"object"},"ResponseWebFetchToolResultError":{"description":"(Deep ref — see upstream Anthropic spec for full definition)","type":"object","x-upstream-stub":true},"ResponseWebSearchCallCompletedEvent":{"description":"Emitted when a web search call is completed.","properties":{"item_id":{"description":"Unique ID for the output item associated with the web search call.\n","type":"string"},"output_index":{"description":"The index of the output item that the web search call is associated with.\n","type":"integer"},"sequence_number":{"description":"The sequence number of the web search call being processed.","type":"integer"},"type":{"description":"The type of the event. Always `response.web_search_call.completed`.\n","enum":["response.web_search_call.completed"],"type":"string","x-stainless-const":true}},"required":["type","output_index","item_id","sequence_number"],"type":"object","x-oaiMeta":{"example":"{\n  \"type\": \"response.web_search_call.completed\",\n  \"output_index\": 0,\n  \"item_id\": \"ws_123\",\n  \"sequence_number\": 0\n}\n","group":"responses","name":"response.web_search_call.completed"}},"ResponseWebSearchCallInProgressEvent":{"description":"Emitted when a web search call is initiated.","properties":{"item_id":{"description":"Unique ID for the output item associated with the web search call.\n","type":"string"},"output_index":{"description":"The index of the output item that the web search call is associated with.\n","type":"integer"},"sequence_number":{"description":"The sequence number of the web search call being processed.","type":"integer"},"type":{"description":"The type of the event. Always `response.web_search_call.in_progress`.\n","enum":["response.web_search_call.in_progress"],"type":"string","x-stainless-const":true}},"required":["type","output_index","item_id","sequence_number"],"type":"object","x-oaiMeta":{"example":"{\n  \"type\": \"response.web_search_call.in_progress\",\n  \"output_index\": 0,\n  \"item_id\": \"ws_123\",\n  \"sequence_number\": 0\n}\n","group":"responses","name":"response.web_search_call.in_progress"}},"ResponseWebSearchCallSearchingEvent":{"description":"Emitted when a web search call is executing.","properties":{"item_id":{"description":"Unique ID for the output item associated with the web search call.\n","type":"string"},"output_index":{"description":"The index of the output item that the web search call is associated with.\n","type":"integer"},"sequence_number":{"description":"The sequence number of the web search call being processed.","type":"integer"},"type":{"description":"The type of the event. Always `response.web_search_call.searching`.\n","enum":["response.web_search_call.searching"],"type":"string","x-stainless-const":true}},"required":["type","output_index","item_id","sequence_number"],"type":"object","x-oaiMeta":{"example":"{\n  \"type\": \"response.web_search_call.searching\",\n  \"output_index\": 0,\n  \"item_id\": \"ws_123\",\n  \"sequence_number\": 0\n}\n","group":"responses","name":"response.web_search_call.searching"}},"ResponseWebSearchResultBlock":{"description":"(Deep ref — see upstream Anthropic spec for full definition)","type":"object","x-upstream-stub":true},"ResponseWebSearchResultLocationCitation":{"description":"(Deep ref — see upstream Anthropic spec for full definition)","properties":{"type":{"type":"string"}},"required":["type"],"type":"object","x-upstream-stub":true},"ResponseWebSearchToolResultBlock":{"properties":{"caller":{"default":{"type":"direct"},"discriminator":{"mapping":{"code_execution_20250825":"#/components/schemas/ServerToolCaller","code_execution_20260120":"#/components/schemas/ServerToolCaller_20260120","direct":"#/components/schemas/DirectCaller"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/DirectCaller"},{"$ref":"#/components/schemas/ServerToolCaller"},{"$ref":"#/components/schemas/ServerToolCaller_20260120"}],"title":"Caller"},"content":{"anyOf":[{"$ref":"#/components/schemas/ResponseWebSearchToolResultError"},{"items":{"$ref":"#/components/schemas/ResponseWebSearchResultBlock"},"type":"array"}],"title":"Content"},"tool_use_id":{"pattern":"^srvtoolu_[a-zA-Z0-9_]+$","title":"Tool Use Id","type":"string"},"type":{"const":"web_search_tool_result","default":"web_search_tool_result","title":"Type","type":"string"}},"required":["caller","content","tool_use_id","type"],"title":"ResponseWebSearchToolResultBlock","type":"object"},"ResponseWebSearchToolResultError":{"description":"(Deep ref — see upstream Anthropic spec for full definition)","type":"object","x-upstream-stub":true},"RetrievalConfig":{"description":"Retrieval config.","properties":{"languageCode":{"description":"Optional. The language code of the user.\nLanguage code for content. Use language tags defined by\n[BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).","type":"string"},"latLng":{"allOf":[{"$ref":"#/components/schemas/LatLng"}],"description":"Optional. The location of the user."}},"type":"object"},"RetrievalMetadata":{"description":"Metadata related to retrieval in the grounding flow.","type":"object","x-upstream-stub":true},"RouteFidelity":{"properties":{"lossy_fields":{"items":{"$ref":"#/components/schemas/LossyField"},"type":"array"},"score":{"type":"number"}},"required":["score","lossy_fields"],"type":"object"},"RouteTimeSeriesGroup":{"properties":{"model":{"type":"string"},"points":{"items":{"$ref":"#/components/schemas/TimeSeriesPoint"},"type":"array"},"provider":{"type":"string"}},"required":["model","provider","points"],"type":"object"},"SafetyRating":{"description":"Safety rating for a piece of content.\n\nThe safety rating contains the category of harm and the\nharm probability level in that category for a piece of content.\nContent is classified for safety across a number of\nharm categories and the probability of the harm classification is included\nhere.","properties":{"blocked":{"description":"Was this content blocked because of this rating?","type":"boolean"},"category":{"allOf":[{"$ref":"#/components/schemas/HarmCategory"}],"description":"Required. The category for this rating."},"probability":{"description":"Required. The probability of harm for this content.","enum":["HARM_PROBABILITY_UNSPECIFIED","NEGLIGIBLE","LOW","MEDIUM","HIGH"],"type":"string"}},"required":["category","probability"],"type":"object"},"SafetySetting":{"description":"Safety setting, affecting the safety-blocking behavior.\n\nPassing a safety setting for a category changes the allowed probability that\ncontent is blocked.","properties":{"category":{"allOf":[{"$ref":"#/components/schemas/HarmCategory"}],"description":"Required. The category for this setting."},"threshold":{"description":"Required. Controls the probability threshold at which harm is blocked.","enum":["HARM_BLOCK_THRESHOLD_UNSPECIFIED","BLOCK_LOW_AND_ABOVE","BLOCK_MEDIUM_AND_ABOVE","BLOCK_ONLY_HIGH","BLOCK_NONE","OFF"],"type":"string"}},"required":["category","threshold"],"type":"object"},"Schema":{"description":"The `Schema` object allows the definition of input and output data types.\nThese types can be objects, but also primitives and arrays.\nRepresents a select subset of an [OpenAPI 3.0 schema\nobject](https://spec.openapis.org/oas/v3.0.3#schema).","properties":{"anyOf":{"description":"Optional. The value should be validated against any (one or more) of the subschemas\nin the list.","items":{"$ref":"#/components/schemas/Schema"},"type":"array"},"default":{"description":"Optional. Default value of the field. Per JSON Schema, this field is intended for\ndocumentation generators and doesn't affect validation. Thus it's included\nhere and ignored so that developers who send schemas with a `default` field\ndon't get unknown-field errors."},"description":{"description":"Optional. A brief description of the parameter. This could contain examples of use.\nParameter description may be formatted as Markdown.","type":"string"},"enum":{"description":"Optional. Possible values of the element of Type.STRING with enum format.\nFor example we can define an Enum Direction as :\n{type:STRING, format:enum, enum:[\"EAST\", NORTH\", \"SOUTH\", \"WEST\"]}","items":{"type":"string"},"type":"array"},"example":{"description":"Optional. Example of the object. Will only populated when the object is the root."},"format":{"description":"Optional. The format of the data. Any value is allowed, but most do not trigger any\nspecial functionality.","type":"string"},"items":{"allOf":[{"$ref":"#/components/schemas/Schema"}],"description":"Optional. Schema of the elements of Type.ARRAY."},"maxItems":{"description":"Optional. Maximum number of the elements for Type.ARRAY.","format":"int64","type":"string"},"maxLength":{"description":"Optional. Maximum length of the Type.STRING","format":"int64","type":"string"},"maxProperties":{"description":"Optional. Maximum number of the properties for Type.OBJECT.","format":"int64","type":"string"},"maximum":{"description":"Optional. Maximum value of the Type.INTEGER and Type.NUMBER","format":"double","type":"number"},"minItems":{"description":"Optional. Minimum number of the elements for Type.ARRAY.","format":"int64","type":"string"},"minLength":{"description":"Optional. SCHEMA FIELDS FOR TYPE STRING\nMinimum length of the Type.STRING","format":"int64","type":"string"},"minProperties":{"description":"Optional. Minimum number of the properties for Type.OBJECT.","format":"int64","type":"string"},"minimum":{"description":"Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER\nMinimum value of the Type.INTEGER and Type.NUMBER","format":"double","type":"number"},"nullable":{"description":"Optional. Indicates if the value may be null.","type":"boolean"},"pattern":{"description":"Optional. Pattern of the Type.STRING to restrict a string to a regular expression.","type":"string"},"properties":{"additionalProperties":{"$ref":"#/components/schemas/Schema"},"description":"Optional. Properties of Type.OBJECT.","type":"object"},"propertyOrdering":{"description":"Optional. The order of the properties.\nNot a standard field in open api spec. Used to determine the order of the\nproperties in the response.","items":{"type":"string"},"type":"array"},"required":{"description":"Optional. Required properties of Type.OBJECT.","items":{"type":"string"},"type":"array"},"title":{"description":"Optional. The title of the schema.","type":"string"},"type":{"allOf":[{"$ref":"#/components/schemas/Type"}],"description":"Required. Data type."}},"required":["type"],"type":"object"},"ScreenshotParam":{"additionalProperties":true,"description":"Opaque upstream schema placeholder for ScreenshotParam; see overlay x-ohmygpt-opaque-upstream-schemas for rationale.","properties":{"type":{"type":"string"}},"required":["type"],"type":"object","x-ohmygpt-opaque":true,"x-ohmygpt-upstream-ref":"ScreenshotParam"},"ScrollParam":{"additionalProperties":true,"description":"Opaque upstream schema placeholder for ScrollParam; see overlay x-ohmygpt-opaque-upstream-schemas for rationale.","properties":{"type":{"type":"string"}},"required":["type"],"type":"object","x-ohmygpt-opaque":true,"x-ohmygpt-upstream-ref":"ScrollParam"},"SearchEntryPoint":{"description":"Google search entry point.","type":"object","x-upstream-stub":true},"SearchTypes":{"description":"Different types of search that can be enabled on the GoogleSearch tool.","type":"object","x-upstream-stub":true},"ServerToolCaller":{"description":"Tool invocation generated by a server-side tool.","properties":{"type":{"type":"string"}},"required":["type"],"type":"object","x-upstream-stub":true},"ServerToolCaller_20260120":{"description":"(Deep ref — see upstream Anthropic spec for full definition)","properties":{"type":{"type":"string"}},"required":["type"],"type":"object","x-upstream-stub":true},"ServerToolUsage":{"properties":{"web_fetch_requests":{"default":0,"description":"The number of web fetch tool requests.","examples":[2],"minimum":0,"title":"Web Fetch Requests","type":"integer"},"web_search_requests":{"default":0,"description":"The number of web search tool requests.","examples":[0],"minimum":0,"title":"Web Search Requests","type":"integer"}},"required":["web_fetch_requests","web_search_requests"],"title":"ServerToolUsage","type":"object"},"ServiceTier":{"anyOf":[{"default":"auto","description":"Specifies the processing type used for serving the request.\n  - If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'.\n  - If set to 'default', then the request will be processed with the standard service behavior for the selected model.\n  - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier.\n  - When not set, the default behavior is 'auto'.\n\n  When the `service_tier` parameter is set, the response body will include the `service_tier` value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter.\n","enum":["auto","default","flex","scale","priority"],"type":"string"},{"type":"null"}]},"SpecificApplyPatchParam":{"description":"Forces the model to call the apply_patch tool when executing a tool call.","properties":{"type":{"default":"apply_patch","description":"The tool to call. Always `apply_patch`.","enum":["apply_patch"],"type":"string","x-stainless-const":true}},"required":["type"],"title":"Specific apply patch tool choice","type":"object"},"SpecificFunctionShellParam":{"description":"Forces the model to call the shell tool when a tool call is required.","properties":{"type":{"default":"shell","description":"The tool to call. Always `shell`.","enum":["shell"],"type":"string","x-stainless-const":true}},"required":["type"],"title":"Specific shell tool choice","type":"object"},"SpeechConfig":{"description":"Config for speech generation and transcription.","properties":{"languageCode":{"description":"Optional. The IETF [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language\ncode that the user configured the app to use. Used for speech recognition\nand synthesis.\n\nValid values are: `de-DE`, `en-AU`, `en-GB`, `en-IN`, `en-US`, `es-US`,\n`fr-FR`, `hi-IN`, `pt-BR`, `ar-XA`, `es-ES`, `fr-CA`, `id-ID`, `it-IT`,\n`ja-JP`, `tr-TR`, `vi-VN`, `bn-IN`, `gu-IN`, `kn-IN`, `ml-IN`, `mr-IN`,\n`ta-IN`, `te-IN`, `nl-NL`, `ko-KR`, `cmn-CN`, `pl-PL`, `ru-RU`, and\n`th-TH`.","type":"string"},"multiSpeakerVoiceConfig":{"allOf":[{"$ref":"#/components/schemas/MultiSpeakerVoiceConfig"}],"description":"Optional. The configuration for the multi-speaker setup.\nIt is mutually exclusive with the voice_config field."},"voiceConfig":{"allOf":[{"$ref":"#/components/schemas/VoiceConfig"}],"description":"The configuration in case of single-voice output."}},"type":"object"},"SpeechMetadata":{"description":"Speech metadata for `text` parts.","type":"object","x-upstream-stub":true},"StatusProviderComponent":{"properties":{"description":{"type":"string"},"display_name":{"description":"Provider name to show to visitors, the same name /v1/models gives the provider.","type":"string"},"last_live_at":{"format":"date-time","type":"string"},"name":{"description":"Provider slug; uptime components use the same value.","type":"string"},"status":{"$ref":"#/components/schemas/PageStatus"}},"required":["name","display_name","status"],"type":"object"},"StatusProviderState":{"properties":{"components":{"items":{"$ref":"#/components/schemas/StatusProviderComponent"},"type":"array"},"is_stale":{"type":"boolean"},"last_live_at":{"format":"date-time","type":"string"}},"required":["components","is_stale"],"type":"object"},"StatusSummaryData":{"properties":{"active_incidents":{"items":{"$ref":"#/components/schemas/IncidentRecord"},"type":"array"},"active_maintenances":{"items":{"$ref":"#/components/schemas/MaintenanceRecord"},"type":"array"},"provider_state":{"$ref":"#/components/schemas/StatusProviderState"},"status":{"$ref":"#/components/schemas/PageStatus"},"updated_at":{"format":"date-time","type":"string"}},"required":["status","provider_state","active_incidents","active_maintenances","updated_at"],"type":"object"},"StatusSummaryEnvelope":{"properties":{"code":{"type":"integer"},"data":{"$ref":"#/components/schemas/StatusSummaryData"},"message":{"type":"string"},"success":{"type":"boolean"}},"required":["success","code","message","data"],"type":"object"},"StopConfiguration":{"default":null,"description":"Not supported with latest reasoning models `o3` and `o4-mini`.\n\nUp to 4 sequences where the API will stop generating further tokens. The\nreturned text will not contain the stop sequence.\n","nullable":true,"oneOf":[{"default":"<|endoftext|>","example":"\n","nullable":true,"type":"string"},{"items":{"example":"[\"\\n\"]","type":"string"},"maxItems":4,"minItems":1,"type":"array"}]},"StopReason":{"enum":["end_turn","max_tokens","stop_sequence","tool_use","pause_turn","refusal"],"type":"string"},"StoredResponseList":{"properties":{"data":{"items":{"$ref":"#/components/schemas/StoredResponseSummary"},"type":"array"},"first_id":{"nullable":true,"type":"string"},"has_more":{"type":"boolean"},"last_id":{"nullable":true,"type":"string"},"object":{"enum":["list"],"type":"string"}},"required":["object","data","first_id","last_id","has_more"],"type":"object"},"StoredResponseSummary":{"properties":{"created_at":{"format":"int64","type":"integer"},"expires_at":{"format":"int64","type":"integer"},"id":{"type":"string"},"model":{"type":"string"},"object":{"enum":["response"],"type":"string"},"output_text":{"type":"string"},"previous_response_id":{"nullable":true,"type":"string"},"status":{"enum":["in_progress","completed","failed","incomplete","cancelled"],"type":"string"},"usage":{"nullable":true,"properties":{"input_tokens":{"type":"integer"},"output_tokens":{"type":"integer"},"total_tokens":{"type":"integer"}},"required":["input_tokens","output_tokens","total_tokens"],"type":"object"}},"required":["id","object","model","status","created_at","expires_at","previous_response_id","output_text"],"type":"object"},"StreamableHttpTransport":{"description":"A transport that can stream HTTP requests and responses.","type":"object","x-upstream-stub":true},"SummaryTextContent":{"description":"A summary text from the model.","properties":{"text":{"description":"A summary of the reasoning output from the model so far.","type":"string"},"type":{"default":"summary_text","description":"The type of the object. Always `summary_text`.","enum":["summary_text"],"type":"string","x-stainless-const":true}},"required":["type","text"],"title":"Summary text","type":"object"},"TextEditor_20250124":{"additionalProperties":false,"properties":{"allowed_callers":{"items":{"enum":["direct","code_execution_20250825","code_execution_20260120"],"type":"string"},"title":"Allowed Callers","type":"array"},"cache_control":{"anyOf":[{"discriminator":{"mapping":{"ephemeral":"#/components/schemas/CacheControlEphemeral"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/CacheControlEphemeral"}]},{"type":"null"}],"description":"Create a cache control breakpoint at this content block.","title":"Cache Control"},"defer_loading":{"description":"If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.","title":"Defer Loading","type":"boolean"},"input_examples":{"items":{"additionalProperties":{"$ref":"#/components/schemas/JsonValue"},"type":"object"},"title":"Input Examples","type":"array"},"name":{"const":"str_replace_editor","description":"Name of the tool.\n\nThis is how the tool will be called by the model and in `tool_use` blocks.","title":"Name","type":"string"},"strict":{"description":"When true, guarantees schema validation on tool names and inputs","title":"Strict","type":"boolean"},"type":{"const":"text_editor_20250124","title":"Type","type":"string"}},"required":["name","type"],"title":"TextEditor_20250124","type":"object"},"TextEditor_20250429":{"additionalProperties":false,"properties":{"allowed_callers":{"items":{"enum":["direct","code_execution_20250825","code_execution_20260120"],"type":"string"},"title":"Allowed Callers","type":"array"},"cache_control":{"anyOf":[{"discriminator":{"mapping":{"ephemeral":"#/components/schemas/CacheControlEphemeral"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/CacheControlEphemeral"}]},{"type":"null"}],"description":"Create a cache control breakpoint at this content block.","title":"Cache Control"},"defer_loading":{"description":"If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.","title":"Defer Loading","type":"boolean"},"input_examples":{"items":{"additionalProperties":{"$ref":"#/components/schemas/JsonValue"},"type":"object"},"title":"Input Examples","type":"array"},"name":{"const":"str_replace_based_edit_tool","description":"Name of the tool.\n\nThis is how the tool will be called by the model and in `tool_use` blocks.","title":"Name","type":"string"},"strict":{"description":"When true, guarantees schema validation on tool names and inputs","title":"Strict","type":"boolean"},"type":{"const":"text_editor_20250429","title":"Type","type":"string"}},"required":["name","type"],"title":"TextEditor_20250429","type":"object"},"TextEditor_20250728":{"additionalProperties":false,"properties":{"allowed_callers":{"items":{"enum":["direct","code_execution_20250825","code_execution_20260120"],"type":"string"},"title":"Allowed Callers","type":"array"},"cache_control":{"anyOf":[{"discriminator":{"mapping":{"ephemeral":"#/components/schemas/CacheControlEphemeral"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/CacheControlEphemeral"}]},{"type":"null"}],"description":"Create a cache control breakpoint at this content block.","title":"Cache Control"},"defer_loading":{"description":"If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.","title":"Defer Loading","type":"boolean"},"input_examples":{"items":{"additionalProperties":{"$ref":"#/components/schemas/JsonValue"},"type":"object"},"title":"Input Examples","type":"array"},"max_characters":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"description":"Maximum number of characters to display when viewing a file. If not specified, defaults to displaying the full file.","title":"Max Characters"},"name":{"const":"str_replace_based_edit_tool","description":"Name of the tool.\n\nThis is how the tool will be called by the model and in `tool_use` blocks.","title":"Name","type":"string"},"strict":{"description":"When true, guarantees schema validation on tool names and inputs","title":"Strict","type":"boolean"},"type":{"const":"text_editor_20250728","title":"Type","type":"string"}},"required":["name","type"],"title":"TextEditor_20250728","type":"object"},"TextResponseFormat":{"description":"Configuration for text output format.","type":"object","x-upstream-stub":true},"TextResponseFormatConfiguration":{"description":"An object specifying the format that the model must output.\n\nConfiguring `{ \"type\": \"json_schema\" }` enables Structured Outputs, \nwhich ensures the model will match your supplied JSON schema. Learn more in the \n[Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).\n\nThe default format is `{ \"type\": \"text\" }` with no additional options.\n\n**Not recommended for gpt-4o and newer models:**\n\nSetting to `{ \"type\": \"json_object\" }` enables the older JSON mode, which\nensures the message the model generates is valid JSON. Using `json_schema`\nis preferred for models that support it.\n","oneOf":[{"$ref":"#/components/schemas/ResponseFormatText"},{"$ref":"#/components/schemas/TextResponseFormatJsonSchema"},{"$ref":"#/components/schemas/ResponseFormatJsonObject"}]},"TextResponseFormatJsonSchema":{"description":"JSON Schema response format. Used to generate structured JSON responses.\nLearn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs).\n","properties":{"description":{"description":"A description of what the response format is for, used by the model to\ndetermine how to respond in the format.\n","type":"string"},"name":{"description":"The name of the response format. Must be a-z, A-Z, 0-9, or contain\nunderscores and dashes, with a maximum length of 64.\n","type":"string"},"schema":{"$ref":"#/components/schemas/ResponseFormatJsonSchemaSchema"},"strict":{"anyOf":[{"default":false,"description":"Whether to enable strict schema adherence when generating the output.\nIf set to true, the model will always follow the exact schema defined\nin the `schema` field. Only a subset of JSON Schema is supported when\n`strict` is `true`. To learn more, read the [Structured Outputs\nguide](https://platform.openai.com/docs/guides/structured-outputs).\n","type":"boolean"},{"type":"null"}]},"type":{"description":"The type of response format being defined. Always `json_schema`.","enum":["json_schema"],"type":"string","x-stainless-const":true}},"required":["type","schema","name"],"title":"JSON schema","type":"object"},"ThinkingConfig":{"description":"Config for thinking features.","properties":{"includeThoughts":{"description":"Indicates whether to include thoughts in the response.\nIf true, thoughts are returned only when available.","type":"boolean"},"thinkingBudget":{"description":"The number of thoughts tokens that the model should generate.","format":"int32","type":"integer"},"thinkingLevel":{"description":"Optional. Controls the maximum depth of the model's internal reasoning process before\nit produces a response. The default value is model-dependent. Refer to the\n[Thinking levels\nguide](https://aistudio.google.com/docs/thinking#thinking-levels) for\nmore details. Recommended for Gemini 3 or later models. Use with earlier\nmodels results in an error.","enum":["THINKING_LEVEL_UNSPECIFIED","MINIMAL","LOW","MEDIUM","HIGH"],"type":"string"}},"type":"object"},"ThinkingConfigAdaptive":{"additionalProperties":false,"properties":{"type":{"const":"adaptive","title":"Type","type":"string"}},"required":["type"],"title":"ThinkingConfigAdaptive","type":"object"},"ThinkingConfigDisabled":{"additionalProperties":false,"properties":{"type":{"const":"disabled","title":"Type","type":"string"}},"required":["type"],"title":"ThinkingConfigDisabled","type":"object"},"ThinkingConfigEnabled":{"additionalProperties":false,"properties":{"budget_tokens":{"description":"Determines how many tokens Claude can use for its internal reasoning process. Larger budgets can enable more thorough analysis for complex problems, improving response quality.\n\nMust be ≥1024 and less than `max_tokens`.\n\nSee [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking) for details.","minimum":1024,"title":"Budget Tokens","type":"integer"},"type":{"const":"enabled","title":"Type","type":"string"}},"required":["budget_tokens","type"],"title":"ThinkingConfigEnabled","type":"object"},"ThinkingConfigParam":{"description":"Configuration for enabling Claude's extended thinking.\n\nWhen enabled, responses include `thinking` content blocks showing Claude's thinking process before the final answer. Requires a minimum budget of 1,024 tokens and counts towards your `max_tokens` limit.\n\nSee [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking) for details.","discriminator":{"mapping":{"adaptive":"#/components/schemas/ThinkingConfigAdaptive","disabled":"#/components/schemas/ThinkingConfigDisabled","enabled":"#/components/schemas/ThinkingConfigEnabled"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/ThinkingConfigEnabled"},{"$ref":"#/components/schemas/ThinkingConfigDisabled"},{"$ref":"#/components/schemas/ThinkingConfigAdaptive"}],"title":"Thinking"},"TimeSeriesPoint":{"description":"One bucket. Latency fields are omitted until the bucket has at least 30 requests; TTFT fields until it has at least 30 requests that recorded a first token.","properties":{"avg_latency_ms":{"type":"number"},"avg_ttft_ms":{"type":"number"},"p50_latency_ms":{"type":"number"},"p50_ttft_ms":{"type":"number"},"p95_ttft_ms":{"type":"number"},"p99_latency_ms":{"type":"number"},"p99_ttft_ms":{"type":"number"},"success_rate":{"description":"Share of successful requests in the bucket (0–1); null until the bucket has at least 20 requests.","maximum":1,"minimum":0,"nullable":true,"type":"number"},"time":{"format":"date-time","type":"string"}},"required":["time","success_rate"],"type":"object"},"ToolCall":{"description":"A predicted server-side `ToolCall` returned from the model. This message\ncontains information about a tool that the model wants to invoke.\nThe client is NOT expected to execute this `ToolCall`. Instead, the\nclient should pass this `ToolCall` back to the API in a subsequent turn\nwithin a `Content` message, along with the corresponding `ToolResponse`.","type":"object","x-upstream-stub":true},"ToolChoice":{"description":"How the model should use the provided tools. The model can use a specific tool, any available tool, decide by itself, or not use tools at all.","discriminator":{"mapping":{"any":"#/components/schemas/ToolChoiceAny","auto":"#/components/schemas/ToolChoiceAuto","none":"#/components/schemas/ToolChoiceNone","tool":"#/components/schemas/ToolChoiceTool"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/ToolChoiceAuto"},{"$ref":"#/components/schemas/ToolChoiceAny"},{"$ref":"#/components/schemas/ToolChoiceTool"},{"$ref":"#/components/schemas/ToolChoiceNone"}],"title":"Tool Choice"},"ToolChoiceAllowed":{"description":"Constrains the tools available to the model to a pre-defined set.\n","properties":{"mode":{"description":"Constrains the tools available to the model to a pre-defined set.\n\n`auto` allows the model to pick from among the allowed tools and generate a\nmessage.\n\n`required` requires the model to call one or more of the allowed tools.\n","enum":["auto","required"],"type":"string"},"tools":{"description":"A list of tool definitions that the model should be allowed to call.\n\nFor the Responses API, the list of tool definitions might look like:\n```json\n[\n  { \"type\": \"function\", \"name\": \"get_weather\" },\n  { \"type\": \"mcp\", \"server_label\": \"deepwiki\" },\n  { \"type\": \"image_generation\" }\n]\n```\n","items":{"additionalProperties":true,"description":"A tool definition that the model should be allowed to call.\n","type":"object","x-oaiExpandable":false},"type":"array"},"type":{"description":"Allowed tool configuration type. Always `allowed_tools`.","enum":["allowed_tools"],"type":"string","x-stainless-const":true}},"required":["type","mode","tools"],"title":"Allowed tools","type":"object"},"ToolChoiceAny":{"additionalProperties":false,"description":"The model will use any available tools.","properties":{"disable_parallel_tool_use":{"description":"Whether to disable parallel tool use.\n\nDefaults to `false`. If set to `true`, the model will output exactly one tool use.","title":"Disable Parallel Tool Use","type":"boolean"},"type":{"const":"any","title":"Type","type":"string"}},"required":["type"],"title":"ToolChoiceAny","type":"object"},"ToolChoiceAuto":{"additionalProperties":false,"description":"The model will automatically decide whether to use tools.","properties":{"disable_parallel_tool_use":{"description":"Whether to disable parallel tool use.\n\nDefaults to `false`. If set to `true`, the model will output at most one tool use.","title":"Disable Parallel Tool Use","type":"boolean"},"type":{"const":"auto","title":"Type","type":"string"}},"required":["type"],"title":"ToolChoiceAuto","type":"object"},"ToolChoiceCustom":{"description":"Use this option to force the model to call a specific custom tool.\n","properties":{"name":{"description":"The name of the custom tool to call.","type":"string"},"type":{"description":"For custom tool calling, the type is always `custom`.","enum":["custom"],"type":"string","x-stainless-const":true}},"required":["type","name"],"title":"Custom tool","type":"object"},"ToolChoiceFunction":{"description":"Use this option to force the model to call a specific function.\n","properties":{"name":{"description":"The name of the function to call.","type":"string"},"type":{"description":"For function calling, the type is always `function`.","enum":["function"],"type":"string","x-stainless-const":true}},"required":["type","name"],"title":"Function tool","type":"object"},"ToolChoiceMCP":{"description":"Use this option to force the model to call a specific tool on a remote MCP server.\n","properties":{"name":{"anyOf":[{"description":"The name of the tool to call on the server.\n","type":"string"},{"type":"null"}]},"server_label":{"description":"The label of the MCP server to use.\n","type":"string"},"type":{"description":"For MCP tools, the type is always `mcp`.","enum":["mcp"],"type":"string","x-stainless-const":true}},"required":["type","server_label"],"title":"MCP tool","type":"object"},"ToolChoiceNone":{"additionalProperties":false,"description":"The model will not be allowed to use tools.","properties":{"type":{"const":"none","title":"Type","type":"string"}},"required":["type"],"title":"ToolChoiceNone","type":"object"},"ToolChoiceOptions":{"description":"Controls which (if any) tool is called by the model.\n\n`none` means the model will not call any tool and instead generates a message.\n\n`auto` means the model can pick between generating a message or calling one or\nmore tools.\n\n`required` means the model must call one or more tools.\n","enum":["none","auto","required"],"title":"Tool choice mode","type":"string"},"ToolChoiceParam":{"description":"How the model should select which tool (or tools) to use when generating\na response. See the `tools` parameter to see how to specify which tools\nthe model can call.\n","oneOf":[{"$ref":"#/components/schemas/ToolChoiceOptions"},{"$ref":"#/components/schemas/ToolChoiceAllowed"},{"$ref":"#/components/schemas/ToolChoiceTypes"},{"$ref":"#/components/schemas/ToolChoiceFunction"},{"$ref":"#/components/schemas/ToolChoiceMCP"},{"$ref":"#/components/schemas/ToolChoiceCustom"},{"$ref":"#/components/schemas/SpecificApplyPatchParam"},{"$ref":"#/components/schemas/SpecificFunctionShellParam"}]},"ToolChoiceTool":{"additionalProperties":false,"description":"The model will use the specified tool with `tool_choice.name`.","properties":{"disable_parallel_tool_use":{"description":"Whether to disable parallel tool use.\n\nDefaults to `false`. If set to `true`, the model will output exactly one tool use.","title":"Disable Parallel Tool Use","type":"boolean"},"name":{"description":"The name of the tool to use.","title":"Name","type":"string"},"type":{"const":"tool","title":"Type","type":"string"}},"required":["name","type"],"title":"ToolChoiceTool","type":"object"},"ToolChoiceTypes":{"description":"Indicates that the model should use a built-in tool to generate a response.\n[Learn more about built-in tools](https://platform.openai.com/docs/guides/tools).\n","properties":{"type":{"description":"The type of hosted tool the model should to use. Learn more about\n[built-in tools](https://platform.openai.com/docs/guides/tools).\n\nAllowed values are:\n- `file_search`\n- `web_search_preview`\n- `computer_use_preview`\n- `code_interpreter`\n- `image_generation`\n","enum":["file_search","web_search_preview","computer_use_preview","web_search_preview_2025_03_11","image_generation","code_interpreter"],"type":"string"}},"required":["type"],"title":"Hosted tool","type":"object"},"ToolConfig":{"description":"The Tool configuration containing parameters for specifying `Tool` use\nin the request.","properties":{"functionCallingConfig":{"allOf":[{"$ref":"#/components/schemas/FunctionCallingConfig"}],"description":"Optional. Function calling config."},"includeServerSideToolInvocations":{"description":"Optional. If true, the API response will include the server-side tool calls and\nresponses within the `Content` message. This allows clients to\nobserve the server's tool interactions.","type":"boolean"},"retrievalConfig":{"allOf":[{"$ref":"#/components/schemas/RetrievalConfig"}],"description":"Optional. Retrieval config."}},"type":"object"},"ToolResponse":{"description":"The output from a server-side `ToolCall` execution. This message contains\nthe results of a tool invocation that was initiated by a `ToolCall`\nfrom the model. The client should pass this `ToolResponse` back to the API\nin a subsequent turn within a `Content` message, along with the corresponding\n`ToolCall`.","type":"object","x-upstream-stub":true},"ToolSearchToolBM25_20251119":{"additionalProperties":false,"properties":{"allowed_callers":{"items":{"enum":["direct","code_execution_20250825","code_execution_20260120"],"type":"string"},"title":"Allowed Callers","type":"array"},"cache_control":{"anyOf":[{"discriminator":{"mapping":{"ephemeral":"#/components/schemas/CacheControlEphemeral"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/CacheControlEphemeral"}]},{"type":"null"}],"description":"Create a cache control breakpoint at this content block.","title":"Cache Control"},"defer_loading":{"description":"If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.","title":"Defer Loading","type":"boolean"},"name":{"const":"tool_search_tool_bm25","description":"Name of the tool.\n\nThis is how the tool will be called by the model and in `tool_use` blocks.","title":"Name","type":"string"},"strict":{"description":"When true, guarantees schema validation on tool names and inputs","title":"Strict","type":"boolean"},"type":{"enum":["tool_search_tool_bm25_20251119","tool_search_tool_bm25"],"title":"Type","type":"string"}},"required":["name","type"],"title":"ToolSearchToolBM25_20251119","type":"object"},"ToolSearchToolRegex_20251119":{"additionalProperties":false,"properties":{"allowed_callers":{"items":{"enum":["direct","code_execution_20250825","code_execution_20260120"],"type":"string"},"title":"Allowed Callers","type":"array"},"cache_control":{"anyOf":[{"discriminator":{"mapping":{"ephemeral":"#/components/schemas/CacheControlEphemeral"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/CacheControlEphemeral"}]},{"type":"null"}],"description":"Create a cache control breakpoint at this content block.","title":"Cache Control"},"defer_loading":{"description":"If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.","title":"Defer Loading","type":"boolean"},"name":{"const":"tool_search_tool_regex","description":"Name of the tool.\n\nThis is how the tool will be called by the model and in `tool_use` blocks.","title":"Name","type":"string"},"strict":{"description":"When true, guarantees schema validation on tool names and inputs","title":"Strict","type":"boolean"},"type":{"enum":["tool_search_tool_regex_20251119","tool_search_tool_regex"],"title":"Type","type":"string"}},"required":["name","type"],"title":"ToolSearchToolRegex_20251119","type":"object"},"ToolsArray":{"description":"An array of tools the model may call while generating a response. You\ncan specify which tool to use by setting the `tool_choice` parameter.\n\nWe support the following categories of tools:\n- **Built-in tools**: Tools that are provided by OpenAI that extend the\n  model's capabilities, like [web search](https://platform.openai.com/docs/guides/tools-web-search)\n  or [file search](https://platform.openai.com/docs/guides/tools-file-search). Learn more about\n  [built-in tools](https://platform.openai.com/docs/guides/tools).\n- **MCP Tools**: Integrations with third-party systems via custom MCP servers\n  or predefined connectors such as Google Drive and SharePoint. Learn more about\n  [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp).\n- **Function calls (custom tools)**: Functions that are defined by you,\n  enabling the model to call your own code with strongly typed arguments\n  and outputs. Learn more about\n  [function calling](https://platform.openai.com/docs/guides/function-calling). You can also use\n  custom tools to call your own code.\n","items":{"$ref":"#/components/schemas/RespTool"},"type":"array"},"TopCandidates":{"description":"Candidates with top log probabilities at each decoding step.","type":"object","x-upstream-stub":true},"TopLogProb":{"description":"The top log probability of a token.","properties":{"bytes":{"items":{"type":"integer"},"type":"array"},"logprob":{"type":"number"},"token":{"type":"string"}},"required":["token","logprob","bytes"],"title":"Top log probability","type":"object"},"TranscriptTextUsageDuration":{"description":"Usage statistics for models billed by audio input duration.","properties":{"seconds":{"description":"Duration of the input audio in seconds.","format":"double","type":"number"},"type":{"description":"The type of the usage object. Always `duration` for this variant.","enum":["duration"],"type":"string"}},"required":["type","seconds"],"title":"Duration Usage","type":"object"},"TranscriptTextUsageTokens":{"description":"Usage statistics for models billed by token usage.","properties":{"input_token_details":{"description":"Details about the input tokens billed for this request.","properties":{"audio_tokens":{"description":"Number of audio tokens billed for this request.","type":"integer"},"text_tokens":{"description":"Number of text tokens billed for this request.","type":"integer"}},"type":"object"},"input_tokens":{"description":"Number of input tokens billed for this request.","type":"integer"},"output_tokens":{"description":"Number of output tokens generated.","type":"integer"},"total_tokens":{"description":"Total number of tokens used (input + output).","type":"integer"},"type":{"description":"The type of the usage object. Always `tokens` for this variant.","enum":["tokens"],"type":"string"}},"required":["type","input_tokens","output_tokens","total_tokens"],"title":"Token Usage","type":"object"},"TranscriptionInclude":{"enum":["logprobs"],"type":"string"},"TranscriptionLanguage":{"description":"A language detected in transcribed audio.","properties":{"code":{"description":"The code of a language detected in the audio.","type":"string"}},"required":["code"],"type":"object"},"TranslationConfig":{"description":"Config for translation features.","properties":{"echoTargetLanguage":{"description":"Optional. If true, the model will generate audio when the target language is spoken,\nessentially it will parrot the input. If false, we will not produce audio\nfor the target language.","type":"boolean"},"targetLanguageCode":{"description":"Required. The target language for translation. Supported values are BCP-47 language\ncodes (e.g. \"en\", \"es\", \"fr\").","type":"string"}},"required":["targetLanguageCode"],"type":"object"},"Type":{"type":"string","x-upstream-stub":true},"TypeParam":{"additionalProperties":true,"description":"Opaque upstream schema placeholder for TypeParam; see overlay x-ohmygpt-opaque-upstream-schemas for rationale.","properties":{"type":{"type":"string"}},"required":["type"],"type":"object","x-ohmygpt-opaque":true,"x-ohmygpt-upstream-ref":"TypeParam"},"UptimeComponent":{"description":"Availability of the component over the window, measured from real traffic. `daily` has one entry per day;\nwith group_by=model, a model released inside the window starts at its release date, and catalog models\nwith no requests in the window are listed too, with an empty `daily`. A model's figures come only from\nrequests for that model: one with too few requests has null figures, not another component's.\nWith group_by=model, each request that left the provider choice to the gateway counts once by the result the caller received. The gateway moves a failed request to another provider, so a request succeeds when any provider serves it. Requests that named a provider are counted under that provider (group_by=provider).\nWith group_by=provider, each upstream attempt sent to that provider counts, including attempts that failed before another provider served the request, excluding rate-limit (429) responses.\nCaller errors (400, 413, 422) are not counted.\n","properties":{"covered_days":{"description":"Days with at least 20 samples of their own.","type":"integer"},"daily":{"items":{"$ref":"#/components/schemas/UptimeDay"},"type":"array"},"name":{"type":"string"},"overall_uptime_pct":{"description":"Availability (%) over all samples in the window; null until there are at least 20 samples.","nullable":true,"type":"number"}},"required":["name","daily","overall_uptime_pct","covered_days"],"type":"object"},"UptimeData":{"properties":{"components":{"items":{"$ref":"#/components/schemas/UptimeComponent"},"type":"array"},"days":{"type":"integer"}},"required":["components","days"],"type":"object"},"UptimeDay":{"description":"One day on the availability bar. A day with fewer than 20 samples is counted together with the days after it until the run has 20 samples or spans 7 days; a short run at the end of the window joins the run before it. Every day in a run carries the run's availability and bounds.\n","properties":{"date":{"format":"date","type":"string"},"from":{"description":"First day of the run this day is counted in; equals date when the day had enough samples on its own.","format":"date","type":"string"},"to":{"description":"Last day of the run this day is counted in.","format":"date","type":"string"},"uptime_pct":{"description":"Availability (%) over the run; null when even the run has fewer than 20 samples, meaning not enough data rather than 100%.","nullable":true,"type":"number"}},"required":["date","from","to","uptime_pct"],"type":"object"},"UptimeEnvelope":{"properties":{"data":{"$ref":"#/components/schemas/UptimeData"},"success":{"type":"boolean"}},"required":["success","data"],"type":"object"},"UrlCitationBody":{"description":"A citation for a web resource used to generate a model response.","properties":{"end_index":{"description":"The index of the last character of the URL citation in the message.","type":"integer"},"start_index":{"description":"The index of the first character of the URL citation in the message.","type":"integer"},"title":{"description":"The title of the web resource.","type":"string"},"type":{"default":"url_citation","description":"The type of the URL citation. Always `url_citation`.","enum":["url_citation"],"type":"string","x-stainless-const":true},"url":{"description":"The URL of the web resource.","type":"string"}},"required":["type","url","start_index","end_index","title"],"title":"URL citation","type":"object"},"UrlContext":{"description":"Tool to support URL context retrieval.","type":"object"},"UrlContextMetadata":{"description":"Metadata related to url context retrieval tool.","properties":{"urlMetadata":{"description":"List of url context.","items":{"$ref":"#/components/schemas/UrlMetadata"},"type":"array"}},"type":"object"},"UrlMetadata":{"description":"Context of the a single url retrieval.","type":"object","x-upstream-stub":true},"Usage":{"properties":{"cache_creation":{"anyOf":[{"$ref":"#/components/schemas/CacheCreation"},{"type":"null"}],"default":null,"description":"Breakdown of cached tokens by TTL"},"cache_creation_input_tokens":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"The number of input tokens used to create the cache entry.","examples":[2051],"title":"Cache Creation Input Tokens"},"cache_read_input_tokens":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"The number of input tokens read from the cache.","examples":[2051],"title":"Cache Read Input Tokens"},"inference_geo":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"The geographic region where inference was performed for this request.","title":"Inference Geo"},"input_tokens":{"description":"The number of input tokens which were used.","examples":[2095],"minimum":0,"title":"Input Tokens","type":"integer"},"output_tokens":{"description":"The number of output tokens which were used.","examples":[503],"minimum":0,"title":"Output Tokens","type":"integer"},"server_tool_use":{"anyOf":[{"$ref":"#/components/schemas/ServerToolUsage"},{"type":"null"}],"default":null,"description":"The number of server tool requests."},"service_tier":{"anyOf":[{"enum":["standard","priority","batch"],"type":"string"},{"type":"null"}],"default":null,"description":"If the request used the priority, standard, or batch tier.","title":"Service Tier"}},"required":["cache_creation","cache_creation_input_tokens","cache_read_input_tokens","inference_geo","input_tokens","output_tokens","server_tool_use","service_tier"],"title":"Usage","type":"object"},"UsageItem":{"properties":{"auth_method":{"description":"How the request authenticated. sk-v1 is an API key; jwt-v1 is a console login session; oauth-v1 is an OAuth app token.","enum":["sk-v1","jwt-v1","oauth-v1"],"type":"string"},"billing_status":{"enum":["final","failed"],"type":"string"},"cache_creation_tokens":{"type":"integer"},"cache_read_tokens":{"type":"integer"},"client_ip":{"description":"Client IP address the request came from. Null for records written before it was recorded.","nullable":true,"type":"string"},"completion_tokens":{"type":"integer"},"cost_credits":{"description":"User charged Credits for this request. BYOK rows contain the platform BYOK service fee.","format":"int64","type":"integer"},"credential_id":{"description":"Stable identity of the API key that made the request, formatted cred_ plus a server-side HMAC of the key, so a client holding the key cannot compute it. Join it to the key list through key_hint. Null when auth_method is not sk-v1. Accepted by the credential_id filter and returned as group_key by /v1/usage/summary?group_by=credential.\n","nullable":true,"type":"string"},"error":{"nullable":true,"type":"string"},"first_token_ms":{"format":"int64","nullable":true,"type":"integer"},"image_dimensions":{"nullable":true,"type":"string"},"image_quality":{"nullable":true,"type":"string"},"input_api":{"description":"Inbound API the request used, for example openai-completions, openai-responses, anthropic-messages, google-generative-ai or openai-embeddings. Null for records written before it was recorded.\n","nullable":true,"type":"string"},"is_stream":{"type":"boolean"},"key_hint":{"description":"Mask of the API key behind credential_id: the key's first 6 characters, U+2026 (…), then its last 4 characters. A usage record belongs to the key in the key list whose key gives the same mask. Null when credential_id is null or the key no longer exists.\n","nullable":true,"type":"string"},"labels":{"additionalProperties":{"type":"string"},"type":"object"},"latency_ms":{"format":"int64","type":"integer"},"list_credits":{"description":"Cost at the provider's list price; compare with cost_credits. Null for BYOK and early records.","format":"int64","nullable":true,"type":"integer"},"model":{"type":"string"},"prompt_tokens":{"type":"integer"},"reasoning_tokens":{"type":"integer"},"request_id":{"type":"string"},"retry_count":{"type":"integer"},"route_id":{"type":"string"},"status":{"type":"integer"},"time":{"type":"string"},"usage_kind":{"type":"string"},"verirelay":{"$ref":"#/components/schemas/VeriRelayReceipt"}},"required":["billing_status","request_id","time","model","usage_kind","cost_credits","latency_ms","completion_tokens","reasoning_tokens","cache_creation_tokens","cache_read_tokens","status","retry_count","prompt_tokens","is_stream","labels","auth_method"],"type":"object"},"UsageKind":{"enum":["llm","embedding","tts","stt","image","video","rerank","moderation","ocr","decision"],"type":"string"},"UsageLatency":{"properties":{"avg_ms":{"format":"int64","type":"integer"},"p50_ms":{"format":"int64","nullable":true,"type":"integer"},"p95_ms":{"format":"int64","nullable":true,"type":"integer"},"p99_ms":{"format":"int64","nullable":true,"type":"integer"},"ttft_avg_ms":{"description":"Average time to first token over the requests in the group that have one (UsageItem.first_token_ms). Null when none do.","format":"int64","nullable":true,"type":"integer"}},"required":["avg_ms"],"type":"object"},"UsageMetadata":{"description":"Metadata on the generation request's token usage.","properties":{"cacheTokensDetails":{"description":"Output only. List of modalities of the cached content in the request input.","items":{"$ref":"#/components/schemas/ModalityTokenCount"},"readOnly":true,"type":"array"},"cachedContentTokenCount":{"description":"Number of tokens in the cached part of the prompt (the cached content)","format":"int32","type":"integer"},"candidatesTokenCount":{"description":"Total number of tokens across all the generated response candidates.","format":"int32","type":"integer"},"candidatesTokensDetails":{"description":"Output only. List of modalities that were returned in the response.","items":{"$ref":"#/components/schemas/ModalityTokenCount"},"readOnly":true,"type":"array"},"promptTokenCount":{"description":"Number of tokens in the prompt. When `cached_content` is set, this is\nstill the total effective prompt size meaning this includes the number of\ntokens in the cached content.","format":"int32","type":"integer"},"promptTokensDetails":{"description":"Output only. List of modalities that were processed in the request input.","items":{"$ref":"#/components/schemas/ModalityTokenCount"},"readOnly":true,"type":"array"},"serviceTier":{"allOf":[{"$ref":"#/components/schemas/GeminiServiceTier"}],"description":"Output only. Service tier of the request.","readOnly":true},"thoughtsTokenCount":{"description":"Output only. Number of tokens of thoughts for thinking models.","format":"int32","readOnly":true,"type":"integer"},"toolUsePromptTokenCount":{"description":"Output only. Number of tokens present in tool-use prompt(s).","format":"int32","readOnly":true,"type":"integer"},"toolUsePromptTokensDetails":{"description":"Output only. List of modalities that were processed for tool-use request inputs.","items":{"$ref":"#/components/schemas/ModalityTokenCount"},"readOnly":true,"type":"array"},"totalTokenCount":{"description":"Total token count for the generation request (prompt + tool-use prompt +\nthoughts + response candidates).","format":"int32","type":"integer"}},"type":"object"},"UsagePeriod":{"properties":{"since":{"type":"string"},"until":{"type":"string"}},"required":["since","until"],"type":"object"},"UsageSummaryCost":{"properties":{"listed_charged_credits":{"description":"What those same requests were charged, in Credits. listed_credits minus listed_charged_credits is the saving (negative means a surcharge); compare against this, not total_credits, which also covers requests without a list price.","format":"int64","type":"integer"},"listed_credits":{"description":"Official list-price amount, in Credits, of the requests that recorded one. Older requests and bring-your-own-key requests have no list price and are excluded.","format":"int64","type":"integer"},"total_credits":{"description":"Total charged, in Credits.","format":"int64","type":"integer"}},"required":["total_credits","listed_credits","listed_charged_credits"],"type":"object"},"UsageSummaryItem":{"properties":{"cost":{"$ref":"#/components/schemas/UsageSummaryCost"},"error_rate":{"format":"double","type":"number"},"group_key":{"type":"string"},"key_hint":{"description":"Only with group_by=credential. Mask of the API key in group_key, same rule as UsageItem.key_hint; absent when the key no longer exists or the group has no key.","nullable":true,"type":"string"},"latency":{"$ref":"#/components/schemas/UsageLatency"},"request_count":{"format":"int64","type":"integer"},"success_count":{"format":"int64","type":"integer"},"time_bucket":{"type":"string"},"tokens":{"$ref":"#/components/schemas/UsageSummaryTokens"}},"required":["latency","group_key","time_bucket","tokens","cost","request_count","success_count","error_rate"],"type":"object"},"UsageSummaryResponse":{"properties":{"bucket":{"$ref":"#/components/schemas/UsageTimeBucket"},"data":{"items":{"$ref":"#/components/schemas/UsageSummaryItem"},"type":"array"},"group_by":{"type":"string"},"period":{"$ref":"#/components/schemas/UsagePeriod"}},"required":["period","bucket","group_by","data"],"type":"object"},"UsageSummaryTokens":{"properties":{"cache_creation":{"format":"int64","type":"integer"},"cache_read":{"format":"int64","type":"integer"},"completion":{"format":"int64","type":"integer"},"prompt":{"format":"int64","type":"integer"},"reasoning":{"format":"int64","type":"integer"}},"required":["prompt","completion","reasoning","cache_read","cache_creation"],"type":"object"},"UsageTimeBucket":{"default":"1d","enum":["1h","1d","7d"],"type":"string"},"UsageTopItem":{"properties":{"key":{"type":"string"},"rank":{"type":"integer"},"share":{"format":"double","type":"number"},"unit":{"type":"string"},"value":{"format":"double","type":"number"}},"required":["key","unit","value","share","rank"],"type":"object"},"UsageTopResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/UsageTopItem"},"type":"array"},"total":{"format":"double","type":"number"}},"required":["data","total"],"type":"object"},"UsageWarning":{"properties":{"code":{"type":"string"},"field":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"UserLocation":{"additionalProperties":false,"properties":{"city":{"anyOf":[{"maxLength":255,"minLength":1,"type":"string"},{"type":"null"}],"description":"The city of the user.","examples":["New York","Tokyo","Los Angeles"],"title":"City"},"country":{"anyOf":[{"maxLength":2,"minLength":2,"type":"string"},{"type":"null"}],"description":"The two letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the user.","examples":["US","JP","GB"],"title":"Country"},"region":{"anyOf":[{"maxLength":255,"minLength":1,"type":"string"},{"type":"null"}],"description":"The region of the user.","examples":["California","Ontario","Wales"],"title":"Region"},"timezone":{"anyOf":[{"maxLength":255,"minLength":1,"type":"string"},{"type":"null"}],"description":"The [IANA timezone](https://nodatime.org/TimeZones) of the user.","examples":["America/New_York","Asia/Tokyo","Europe/London"],"title":"Timezone"},"type":{"const":"approximate","title":"Type","type":"string"}},"required":["type"],"title":"UserLocation","type":"object"},"V1mainMediaResolution":{"description":"Media resolution for tokenization.","type":"object","x-upstream-stub":true},"VadConfig":{"additionalProperties":false,"properties":{"prefix_padding_ms":{"default":300,"description":"Amount of audio to include before the VAD detected speech (in \nmilliseconds).\n","type":"integer"},"silence_duration_ms":{"default":200,"description":"Duration of silence to detect speech stop (in milliseconds).\nWith shorter values the model will respond more quickly, \nbut may jump in on short pauses from the user.\n","type":"integer"},"threshold":{"default":0.5,"description":"Sensitivity threshold (0.0 to 1.0) for voice activity detection. A \nhigher threshold will require louder audio to activate the model, and \nthus might perform better in noisy environments.\n","type":"number"},"type":{"description":"Must be set to `server_vad` to enable manual chunking using server side VAD.","enum":["server_vad"],"type":"string"}},"required":["type"],"type":"object"},"VectorStoreFileAttributes":{"anyOf":[{"additionalProperties":{"oneOf":[{"maxLength":512,"type":"string"},{"type":"number"},{"type":"boolean"}]},"description":"Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard. Keys are strings\nwith a maximum length of 64 characters. Values are strings with a maximum\nlength of 512 characters, booleans, or numbers.\n","maxProperties":16,"propertyNames":{"maxLength":64,"type":"string"},"type":"object","x-oaiTypeLabel":"map"},{"type":"null"}]},"Verbosity":{"anyOf":[{"default":"medium","description":"Constrains the verbosity of the model's response. Lower values will result in\nmore concise responses, while higher values will result in more verbose responses.\nCurrently supported values are `low`, `medium`, and `high`.\n","enum":["low","medium","high"],"type":"string"},{"type":"null"}]},"VeriRelayReceipt":{"description":"The VeriRelay receipt returned in this request's X-VeriRelay-* response headers. Present only when the request succeeded through VeriRelay, whose signing key lives in an AMD SEV-SNP confidential VM: VeriRelay signs a receipt only for a forward that completed. Use these values to verify the request at https://verirelay.com/verify against `relay`. VeriRelay deletes the signed receipt and the raw capture when they expire, so verification fails after that.\n","properties":{"receipt_expires_at":{"description":"When VeriRelay deletes the signed receipt.","format":"date-time","type":"string"},"relay":{"description":"The VeriRelay instance that signed the receipt and keeps the raw capture.","format":"uri","type":"string"},"request_id":{"description":"X-VeriRelay-Request-Id. Fetches the signed receipt.","type":"string"},"store_expires_at":{"description":"When VeriRelay deletes the raw capture at the latest. Absent when VeriRelay stored no raw capture.","format":"date-time","type":"string"},"store_id":{"description":"X-VeriRelay-Store-Id. Locates the raw capture of the exchange with the provider. Absent when VeriRelay stored no raw capture.","type":"string"},"store_key":{"description":"X-VeriRelay-Store-Key. Decrypts the raw capture, so anyone holding it together with store_id can read the original request and response until the capture expires. Absent when VeriRelay stored no raw capture.","type":"string"}},"required":["request_id","relay","receipt_expires_at"],"type":"object"},"VideoCreateRequest":{"additionalProperties":true,"description":"Other top-level fields go to the model unchanged; they cannot set the duration, size or media, which have the fields below.","properties":{"media":{"description":"Frames and references for image-to-video and reference-to-video models.","items":{"$ref":"#/components/schemas/VideoMedia"},"type":"array"},"model":{"description":"A video model ID from `GET /v1/models`","type":"string"},"prompt":{"type":"string"},"seconds":{"description":"The video length; one of the model's `limits.video.seconds`, the first of them by default.","type":"integer"},"size":{"default":"1280x720","description":"Width by height, such as `848x480`; one of the sizes in the model's pricing.","type":"string"}},"required":["model","prompt"],"type":"object"},"VideoJob":{"properties":{"created_at":{"format":"date-time","type":"string"},"error":{"description":"Why the job failed","properties":{"code":{"description":"Such as `content_policy_violation`, `upstream_video_failed` or `model_timeout`","type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"finished_at":{"format":"date-time","type":"string"},"id":{"type":"string"},"model":{"type":"string"},"object":{"enum":["video"],"type":"string"},"progress":{"description":"Percent done, as far as the provider reports it","maximum":100,"minimum":0,"type":"integer"},"result_available":{"description":"Whether `GET /v1/videos/{id}/content` can download the video now","type":"boolean"},"result_url_expires_at":{"description":"When the download stops being available","format":"date-time","type":"string"},"seconds":{"type":"integer"},"size":{"type":"string"},"status":{"description":"`creating` until the provider accepts the job; `completed`, `failed` and `cancelled` are final.","enum":["creating","queued","in_progress","completed","failed","cancelled"],"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","object","model","status","progress","seconds","size","result_available","created_at","updated_at"],"type":"object"},"VideoJobList":{"properties":{"data":{"items":{"$ref":"#/components/schemas/VideoJob"},"type":"array"},"has_more":{"type":"boolean"},"next_cursor":{"description":"Pass as `cursor` for the next page; null on the last page.","nullable":true,"type":"string"},"object":{"enum":["list"],"type":"string"}},"required":["object","data","has_more"],"type":"object"},"VideoMedia":{"properties":{"type":{"description":"The role of this input. Image roles need a model with image input, and so on for video and audio.","enum":["first_frame","last_frame","reference_image","reference_video","reference_audio"],"type":"string"},"url":{"description":"A public URL or a data URL","type":"string"}},"required":["type","url"],"type":"object"},"VideoMetadata":{"description":"Metadata describes the input video content.\nSet this in `Part.video_metadata` or `FunctionResponsePart.video_metadata`\nwhen `inline_data` or `file_data` contains video to configure static video\npreprocessing (such as time clipping, frame rate, maximum frame count, or\nextracted content layers).","type":"object","x-upstream-stub":true},"VoiceConfig":{"description":"The configuration for the voice to use.","properties":{"prebuiltVoiceConfig":{"allOf":[{"$ref":"#/components/schemas/PrebuiltVoiceConfig"}],"description":"The configuration for the prebuilt voice to use."},"voice":{"description":"Optional. The speaker identifier for synthesis.\nSupported formats:\n\n*   Speaker name for prebuilt voices (for example, `Orus` or `Kore`).\n*   Voice ID for stored voices (for example, `voice_xxx`).\n*   Voice replication key (for example, `voicekey_xxx`).","type":"string"}},"type":"object"},"VoiceIdsOrCustomVoice":{"anyOf":[{"allOf":[{"$ref":"#/components/schemas/VoiceIdsShared"}],"type":"string"},{"additionalProperties":false,"description":"Custom voice reference.","properties":{"id":{"description":"The custom voice ID, e.g. `voice_1234`.","example":"voice_1234","type":"string"}},"required":["id"],"type":"object"}],"description":"A built-in voice name or a custom voice reference.\n","title":"Voice"},"VoiceIdsShared":{"anyOf":[{"type":"string"},{"enum":["alloy","ash","ballad","coral","echo","sage","shimmer","verse","marin","cedar"],"type":"string"}],"example":"ash"},"WaitParam":{"additionalProperties":true,"description":"Opaque upstream schema placeholder for WaitParam; see overlay x-ohmygpt-opaque-upstream-schemas for rationale.","properties":{"type":{"type":"string"}},"required":["type"],"type":"object","x-ohmygpt-opaque":true,"x-ohmygpt-upstream-ref":"WaitParam"},"WebFetchTool_20250910":{"additionalProperties":false,"properties":{"allowed_callers":{"items":{"enum":["direct","code_execution_20250825","code_execution_20260120"],"type":"string"},"title":"Allowed Callers","type":"array"},"allowed_domains":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"description":"List of domains to allow fetching from","title":"Allowed Domains"},"blocked_domains":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"description":"List of domains to block fetching from","title":"Blocked Domains"},"cache_control":{"anyOf":[{"discriminator":{"mapping":{"ephemeral":"#/components/schemas/CacheControlEphemeral"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/CacheControlEphemeral"}]},{"type":"null"}],"description":"Create a cache control breakpoint at this content block.","title":"Cache Control"},"citations":{"anyOf":[{"$ref":"#/components/schemas/RequestCitationsConfig"},{"type":"null"}],"description":"Citations configuration for fetched documents. Citations are disabled by default."},"defer_loading":{"description":"If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.","title":"Defer Loading","type":"boolean"},"max_content_tokens":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"description":"Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.","title":"Max Content Tokens"},"max_uses":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"description":"Maximum number of times the tool can be used in the API request.","title":"Max Uses"},"name":{"const":"web_fetch","description":"Name of the tool.\n\nThis is how the tool will be called by the model and in `tool_use` blocks.","title":"Name","type":"string"},"strict":{"description":"When true, guarantees schema validation on tool names and inputs","title":"Strict","type":"boolean"},"type":{"const":"web_fetch_20250910","title":"Type","type":"string"}},"required":["name","type"],"title":"WebFetchTool_20250910","type":"object"},"WebFetchTool_20260209":{"additionalProperties":false,"properties":{"allowed_callers":{"items":{"enum":["direct","code_execution_20250825","code_execution_20260120"],"type":"string"},"title":"Allowed Callers","type":"array"},"allowed_domains":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"description":"List of domains to allow fetching from","title":"Allowed Domains"},"blocked_domains":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"description":"List of domains to block fetching from","title":"Blocked Domains"},"cache_control":{"anyOf":[{"discriminator":{"mapping":{"ephemeral":"#/components/schemas/CacheControlEphemeral"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/CacheControlEphemeral"}]},{"type":"null"}],"description":"Create a cache control breakpoint at this content block.","title":"Cache Control"},"citations":{"anyOf":[{"$ref":"#/components/schemas/RequestCitationsConfig"},{"type":"null"}],"description":"Citations configuration for fetched documents. Citations are disabled by default."},"defer_loading":{"description":"If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.","title":"Defer Loading","type":"boolean"},"max_content_tokens":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"description":"Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.","title":"Max Content Tokens"},"max_uses":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"description":"Maximum number of times the tool can be used in the API request.","title":"Max Uses"},"name":{"const":"web_fetch","description":"Name of the tool.\n\nThis is how the tool will be called by the model and in `tool_use` blocks.","title":"Name","type":"string"},"strict":{"description":"When true, guarantees schema validation on tool names and inputs","title":"Strict","type":"boolean"},"type":{"const":"web_fetch_20260209","title":"Type","type":"string"}},"required":["name","type"],"title":"WebFetchTool_20260209","type":"object"},"WebSearchActionFind":{"description":"Action type \"find_in_page\": Searches for a pattern within a loaded page.\n","properties":{"pattern":{"description":"The pattern or text to search for within the page.\n","type":"string"},"type":{"description":"The action type.\n","enum":["find_in_page"],"type":"string","x-stainless-const":true},"url":{"description":"The URL of the page searched for the pattern.\n","format":"uri","type":"string"}},"required":["type","url","pattern"],"title":"Find action","type":"object"},"WebSearchActionOpenPage":{"description":"Action type \"open_page\" - Opens a specific URL from search results.\n","properties":{"type":{"description":"The action type.\n","enum":["open_page"],"type":"string","x-stainless-const":true},"url":{"anyOf":[{"format":"uri","type":"string"},{"type":"null"}],"description":"The URL opened by the model.\n"}},"required":["type"],"title":"Open page action","type":"object"},"WebSearchActionSearch":{"description":"Action type \"search\" - Performs a web search query.\n","properties":{"queries":{"description":"The search queries.\n","items":{"description":"A search query.\n","type":"string"},"title":"Search queries","type":"array"},"query":{"description":"[DEPRECATED] The search query.\n","type":"string"},"sources":{"description":"The sources used in the search.\n","items":{"description":"A source used in the search.\n","properties":{"type":{"description":"The type of source. Always `url`.\n","enum":["url"],"type":"string","x-stainless-const":true},"url":{"description":"The URL of the source.\n","type":"string"}},"required":["type","url"],"title":"Web search source","type":"object"},"title":"Web search sources","type":"array"},"type":{"description":"The action type.\n","enum":["search"],"type":"string","x-stainless-const":true}},"required":["type","query"],"title":"Search action","type":"object"},"WebSearchContextSize":{"default":"medium","description":"High level guidance for the amount of context window space to use for the \nsearch. One of `low`, `medium`, or `high`. `medium` is the default.\n","enum":["low","medium","high"],"type":"string"},"WebSearchLocation":{"description":"Approximate location parameters for the search.","properties":{"city":{"description":"Free text input for the city of the user, e.g. `San Francisco`.\n","type":"string"},"country":{"description":"The two-letter \n[ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user,\ne.g. `US`.\n","type":"string"},"region":{"description":"Free text input for the region of the user, e.g. `California`.\n","type":"string"},"timezone":{"description":"The [IANA timezone](https://timeapi.io/documentation/iana-timezones) \nof the user, e.g. `America/Los_Angeles`.\n","type":"string"}},"title":"Web search location","type":"object"},"WebSearchPreviewTool":{"additionalProperties":true,"description":"Opaque upstream schema placeholder for WebSearchPreviewTool; see overlay x-ohmygpt-opaque-upstream-schemas for rationale.","properties":{"type":{"type":"string"}},"required":["type"],"type":"object","x-ohmygpt-opaque":true,"x-ohmygpt-upstream-ref":"WebSearchPreviewTool"},"WebSearchTool":{"additionalProperties":true,"description":"Opaque upstream schema placeholder for WebSearchTool; see overlay x-ohmygpt-opaque-upstream-schemas for rationale.","properties":{"type":{"type":"string"}},"required":["type"],"type":"object","x-ohmygpt-opaque":true,"x-ohmygpt-upstream-ref":"WebSearchTool"},"WebSearchToolCall":{"description":"The results of a web search tool call. See the\n[web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information.\n","properties":{"action":{"description":"An object describing the specific action taken in this web search call.\nIncludes details on how the model used the web (search, open_page, find_in_page).\n","discriminator":{"mapping":{"find_in_page":"#/components/schemas/WebSearchActionFind","open_page":"#/components/schemas/WebSearchActionOpenPage","search":"#/components/schemas/WebSearchActionSearch"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/WebSearchActionSearch"},{"$ref":"#/components/schemas/WebSearchActionOpenPage"},{"$ref":"#/components/schemas/WebSearchActionFind"}],"type":"object"},"id":{"description":"The unique ID of the web search tool call.\n","type":"string"},"status":{"description":"The status of the web search tool call.\n","enum":["in_progress","searching","completed","failed"],"type":"string"},"type":{"description":"The type of the web search tool call. Always `web_search_call`.\n","enum":["web_search_call"],"type":"string","x-stainless-const":true}},"required":["id","type","status","action"],"title":"Web search tool call","type":"object"},"WebSearchTool_20250305":{"additionalProperties":false,"properties":{"allowed_callers":{"items":{"enum":["direct","code_execution_20250825","code_execution_20260120"],"type":"string"},"title":"Allowed Callers","type":"array"},"allowed_domains":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"description":"If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`.","title":"Allowed Domains"},"blocked_domains":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"description":"If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`.","title":"Blocked Domains"},"cache_control":{"anyOf":[{"discriminator":{"mapping":{"ephemeral":"#/components/schemas/CacheControlEphemeral"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/CacheControlEphemeral"}]},{"type":"null"}],"description":"Create a cache control breakpoint at this content block.","title":"Cache Control"},"defer_loading":{"description":"If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.","title":"Defer Loading","type":"boolean"},"max_uses":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"description":"Maximum number of times the tool can be used in the API request.","title":"Max Uses"},"name":{"const":"web_search","description":"Name of the tool.\n\nThis is how the tool will be called by the model and in `tool_use` blocks.","title":"Name","type":"string"},"strict":{"description":"When true, guarantees schema validation on tool names and inputs","title":"Strict","type":"boolean"},"type":{"const":"web_search_20250305","title":"Type","type":"string"},"user_location":{"anyOf":[{"$ref":"#/components/schemas/UserLocation"},{"type":"null"}],"description":"Parameters for the user's location. Used to provide more relevant search results."}},"required":["name","type"],"title":"WebSearchTool_20250305","type":"object"},"WebSearchTool_20260209":{"additionalProperties":false,"properties":{"allowed_callers":{"items":{"enum":["direct","code_execution_20250825","code_execution_20260120"],"type":"string"},"title":"Allowed Callers","type":"array"},"allowed_domains":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"description":"If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`.","title":"Allowed Domains"},"blocked_domains":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"description":"If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`.","title":"Blocked Domains"},"cache_control":{"anyOf":[{"discriminator":{"mapping":{"ephemeral":"#/components/schemas/CacheControlEphemeral"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/CacheControlEphemeral"}]},{"type":"null"}],"description":"Create a cache control breakpoint at this content block.","title":"Cache Control"},"defer_loading":{"description":"If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.","title":"Defer Loading","type":"boolean"},"max_uses":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"description":"Maximum number of times the tool can be used in the API request.","title":"Max Uses"},"name":{"const":"web_search","description":"Name of the tool.\n\nThis is how the tool will be called by the model and in `tool_use` blocks.","title":"Name","type":"string"},"strict":{"description":"When true, guarantees schema validation on tool names and inputs","title":"Strict","type":"boolean"},"type":{"const":"web_search_20260209","title":"Type","type":"string"},"user_location":{"anyOf":[{"$ref":"#/components/schemas/UserLocation"},{"type":"null"}],"description":"Parameters for the user's location. Used to provide more relevant search results."}},"required":["name","type"],"title":"WebSearchTool_20260209","type":"object"},"WeeklyLeaderboardItem":{"properties":{"change_pct":{"description":"Relative change in this model's tokens against last week's same span, in percent rounded to a whole percent; null until both spans have at least 20 requests, or when the previous span served no tokens.","nullable":true,"type":"number"},"model":{"description":"Canonical model ID.","type":"string"},"previous_rank":{"description":"Rank last week over the same span (Monday 00:00 UTC up to the same weekday and time), counted the same way; null when the model served no tokens in that span.","minimum":1,"nullable":true,"type":"integer"},"previous_share":{"description":"Share (0–1) of the tokens served to all public models last week over the same span, rounded like share; null when the model served no tokens in that span.","maximum":1,"minimum":0,"nullable":true,"type":"number"},"rank":{"description":"Position by prompt plus completion tokens served this week so far among all public models, 1 for the most; models with equal tokens are ordered by model ID.","minimum":1,"type":"integer"},"share":{"description":"Share (0–1) of the tokens served to all public models this week so far, rounded to whole percentage points (0.01 steps; below 0.005 is 0, while rank still follows the true order).","maximum":1,"minimum":0,"type":"number"}},"required":["model","rank","share","previous_rank","previous_share","change_pct"],"type":"object"},"WeeklyModelRankingsResponse":{"properties":{"as_of":{"description":"When the numbers were computed; the current week and the leaderboard cover Monday 00:00 UTC up to this time.","format":"date-time","type":"string"},"data":{"description":"One entry per ISO week, oldest first, ending with the current week (in progress). Weeks without traffic are included with every share 0.","items":{"$ref":"#/components/schemas/WeeklyModelUsage"},"type":"array"},"leaderboard":{"description":"Up to 20 models with the most tokens this week so far, sorted by rank.","items":{"$ref":"#/components/schemas/WeeklyLeaderboardItem"},"type":"array"},"weeks":{"description":"Number of weeks in data.","type":"integer"}},"required":["weeks","as_of","data","leaderboard"],"type":"object"},"WeeklyModelShare":{"properties":{"model":{"description":"Canonical model ID.","type":"string"},"share":{"description":"Share (0–1) of the prompt plus completion tokens served to all public models that week, rounded to whole percentage points (0.01 steps; below 0.005 is 0).","maximum":1,"minimum":0,"type":"number"}},"required":["model","share"],"type":"object"},"WeeklyModelUsage":{"properties":{"models":{"description":"The charted models, the same models in the same order every week (most tokens over the whole window first); share 0 when a model served nothing that week.","items":{"$ref":"#/components/schemas/WeeklyModelShare"},"type":"array"},"other_share":{"description":"Combined share (0–1) of every other public model that week, in whole percentage points. It also absorbs the rounding of the charted shares, so models plus other_share sum to exactly 1 (or are all 0 in a week without traffic) and it is never negative.","maximum":1,"minimum":0,"type":"number"},"week_start":{"description":"Monday of the ISO week (UTC), YYYY-MM-DD.","format":"date","type":"string"}},"required":["week_start","models","other_share"],"type":"object"},"complexity":{"description":"Computation spent planning the image, independently of rendering quality. Uses the image model's configured default when omitted. For SVG output, controls the reference image, independently of the SVG author's reasoning.","enum":["low","medium","high",null],"type":["string","null"]},"frame_count":{"description":"Number of frames for GIF output. Accepts integers from 2 through 16. Defaults to 9 when omitted. Only supported with output_format=gif. The requested size must satisfy the selected model's GIF size limits. GIF output does not support streaming, partial images, masks, or custom output compression. Requires access to the GIF preview for the selected model.","maximum":16,"minimum":2,"type":["integer","null"]},"frame_duration_ms":{"description":"Requested delay per GIF frame, in milliseconds. Defaults to 200 when omitted. GIF output rounds to the nearest 10 ms and caps the encoded delay at 655,350 ms per frame. Only supported with output_format=gif.","minimum":20,"type":["integer","null"]},"svg":{"description":"Selects the model and reasoning effort used to author SVG output. Requires output_format=svg and access to SVG model selection. When model selection is enabled, supply svg.model. When model selection is disabled, omit this object. The top-level model selects the image model that creates the reference image. SVG generation requires n=1 and does not support streaming, partial images, prompt_rewriter, or output_compression. SVG edits are not supported.","properties":{"model":{"description":"Model used to author the SVG. Required when SVG model selection is enabled.","minLength":1,"type":"string"},"reasoning":{"description":"Reasoning settings for the SVG author, independent of image complexity. Omitted or null effort uses the author model's default. Supported efforts depend on the selected author model.","properties":{"effort":{"anyOf":[{"$ref":"#/components/schemas/ReasoningEffortEnum"},{"type":"null"}],"description":"Controls how much effort the SVG author spends on reasoning. Uses the author model's default when omitted or null."}},"type":["object","null"]}},"required":["model"],"type":["object","null"]}},"securitySchemes":{"ApiKeyAuth":{"in":"header","name":"Authorization","type":"apiKey"},"BearerAuth":{"bearerFormat":"JWT","scheme":"bearer","type":"http"},"GoogleApiKeyAuth":{"description":"The header the Google Gen AI SDKs send; the Gemini endpoints accept it as well as `Authorization`.","in":"header","name":"x-goog-api-key","type":"apiKey"}}},"info":{"contact":{"name":"OhMyGPT","url":"https://www.ohmygpt.com"},"description":"OhMyGPT AI API — one API key for 270+ models through OpenAI-compatible and Anthropic-compatible endpoints, with provider-native parameters passed through and every request charged in Credits.\n","license":{"name":"PRIVATE PROPRIETARY"},"title":"OhMyGPT API","version":"1.0.0"},"openapi":"3.2.0","paths":{"/v1/audio/speech":{"post":{"description":"Read text aloud. The response body is the audio in the requested `response_format` (MP3 by default), billed per input character.","operationId":"createSpeech","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSpeechRequest"}}},"required":true},"responses":{"200":{"content":{"audio/*":{"schema":{"format":"binary","type":"string"}}},"description":"The generated audio, such as `audio/mpeg` for MP3","headers":{"X-Cost-Credits":{"description":"Final cost of this request in Credits.","schema":{"type":"integer"}},"X-Request-ID":{"description":"Unique ID of this request; include it when contacting support","schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/ModelForbidden"},"429":{"$ref":"#/components/responses/ModelRateLimited"}},"security":[{"ApiKeyAuth":[]}],"summary":"Create speech","tags":["Audio"]}},"/v1/audio/transcriptions":{"post":{"description":"Transcribe an audio file into text. Upload the audio as `multipart/form-data`; billing follows the usage the model reports, by audio duration or by tokens.","operationId":"createTranscription","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/CreateTranscriptionRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTranscriptionResponseJson"}}},"description":"Successful response","headers":{"X-Cost-Credits":{"description":"Final cost of this request in Credits.","schema":{"type":"integer"}},"X-Request-ID":{"description":"Unique ID of this request; include it when contacting support","schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/ModelForbidden"},"429":{"$ref":"#/components/responses/ModelRateLimited"}},"security":[{"ApiKeyAuth":[]}],"summary":"Create transcription","tags":["Audio"]}},"/v1/chat/completions":{"post":{"description":"OpenAI-compatible Chat Completions endpoint for 270+ models. Provider-native parameters (thinking, reasoning_effort, etc.) are passed through to the serving provider unchanged.\n","operationId":"createChatCompletion","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateChatCompletionRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayChatCompletionResponse"}}},"description":"Successful response","headers":{"X-Cost-Credits":{"description":"Non-streaming responses include the final cost in Credits via this header; for streaming responses with an explicit terminal frame (OpenAI [DONE], Anthropic message_stop, Responses completed), the final cost is transmitted as an SSE comment line (': x-cost-credits: N') immediately before the terminal frame. Comments are skipped by SSE parsers, so SDK consumers should parse the raw SSE stream to observe the cost. Streams without an explicit terminal frame do not carry the comment.","schema":{"type":"integer"}},"X-Request-ID":{"description":"Unique ID of this request; include it when contacting support","schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/ModelForbidden"},"429":{"$ref":"#/components/responses/ModelRateLimited"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"ApiKeyAuth":[]}],"summary":"Create chat completion","tags":["Chat"]}},"/v1/contact":{"post":{"description":"Sends a sales inquiry, or a request for a model that is not available yet or not in the catalog, to help@ohmygpt.com. A 202 response means the message is stored and will be delivered; it does not need to be sent again. Replies go to the email address in the message. Limited to a few messages per minute per IP address.\n","operationId":"createContactMessage","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactRequest"}}},"required":true},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactAccepted"}}},"description":"The message is stored and will be delivered."},"400":{"$ref":"#/components/responses/BadRequest"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[],"summary":"Send a message to the OhMyGPT team","tags":["Contact"]}},"/v1/cost-estimates":{"post":{"description":"Estimates what a request would cost without sending it or charging the account. Send the body you would send to the model's endpoint. Video models are priced exactly as `POST /v1/videos` freezes the job price, from `seconds`, `size` and `media`; text to speech is priced by the characters of `input`; chat models get an upper bound from the text of `messages` and `max_tokens`. The model string is resolved the same way a request is, at the caller's effective price (including contract pricing); when several routes could serve it at different prices, the most expensive is returned, because the serving route depends on availability at request time. Time-window pricing (peak/off-peak) is resolved at the current UTC time.\n","operationId":"createCostEstimate","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CostEstimateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CostEstimateResult"}}},"description":"Cost estimate."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"security":[{"ApiKeyAuth":[]}],"summary":"Estimate request cost","tags":["Billing"]}},"/v1/credits":{"get":{"description":"Returns the authenticated account's purchased credit total and lifetime request usage as USD amounts.","operationId":"getCredits","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditsResponse"}}},"description":"Credit summary."},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get credits","tags":["Billing"]}},"/v1/currency-rates":{"get":{"operationId":"getCurrencyRates","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurrencyRatesEnvelope"}}},"description":"Successful response"}},"security":[],"summary":"Get fixed currency-to-coins rates","tags":["Billing"]}},"/v1/embeddings":{"post":{"description":"Generate vector representations of text. Supports multiple embedding providers.","operationId":"createEmbedding","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEmbeddingRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayEmbeddingResponse"}}},"description":"Successful response","headers":{"X-Cost-Credits":{"description":"Non-streaming responses include the final cost in Credits via this header; for streaming responses with an explicit terminal frame (OpenAI [DONE], Anthropic message_stop, Responses completed), the final cost is transmitted as an SSE comment line (': x-cost-credits: N') immediately before the terminal frame. Comments are skipped by SSE parsers, so SDK consumers should parse the raw SSE stream to observe the cost. Streams without an explicit terminal frame do not carry the comment.","schema":{"type":"integer"}},"X-Request-ID":{"description":"Unique ID of this request; include it when contacting support","schema":{"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/ModelForbidden"},"429":{"$ref":"#/components/responses/ModelRateLimited"}},"security":[{"ApiKeyAuth":[]}],"summary":"Create embedding","tags":["Embeddings"]}},"/v1/generation":{"get":{"description":"Vercel-style lookup wrapper for a generation record. The query parameter and returned data refer to the same user-scoped request ID used by /v1/generations/{id}.\n","operationId":"getGenerationLookup","parameters":[{"description":"Request ID.","in":"query","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerationLookupEnvelope"}}},"description":"Generation lookup envelope."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"ApiKeyAuth":[]}],"summary":"Retrieve generation lookup","tags":["Usage"]}},"/v1/generations/{id}":{"get":{"description":"Returns one request generation lookup record owned by the authenticated user. The response contains public request facts and the user-visible charge in Credits.\n","operationId":"getGeneration","parameters":[{"description":"Request ID.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestReceipt"}}},"description":"Generation detail."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"ApiKeyAuth":[]}],"summary":"Retrieve generation detail","tags":["Usage"]}},"/v1/images/generations":{"post":{"description":"Generate images from a text prompt. Image models are billed per image or per token, as listed in each model's pricing.","operationId":"createImage","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateImageRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImagesResponse"}}},"description":"Successful response","headers":{"X-Cost-Credits":{"description":"Final cost of this request in Credits.","schema":{"type":"integer"}},"X-Request-ID":{"description":"Unique ID of this request; include it when contacting support","schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/ModelForbidden"},"429":{"$ref":"#/components/responses/ModelRateLimited"}},"security":[{"ApiKeyAuth":[]}],"summary":"Create image","tags":["Images"]}},"/v1/me":{"get":{"description":"Returns the authenticated user's account ID, current requests-per-minute limit, and the recharge tier that raises it.","operationId":"getMe","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}},"description":"Current user information."},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get current user","tags":["Account"]}},"/v1/messages":{"post":{"description":"Anthropic Messages API endpoint. Supports extended_thinking, tool_use, cache_control, and other native features. Non-Anthropic models are automatically handled via cross-protocol translation.\n","operationId":"createMessage","parameters":[{"description":"Anthropic API version string","in":"header","name":"anthropic-version","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthCreateMessageParams"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayAnthropicMessageResponse"}}},"description":"Successful response","headers":{"X-Cost-Credits":{"description":"Non-streaming responses include the final cost in Credits via this header; for streaming responses with an explicit terminal frame (OpenAI [DONE], Anthropic message_stop, Responses completed), the final cost is transmitted as an SSE comment line (': x-cost-credits: N') immediately before the terminal frame. Comments are skipped by SSE parsers, so SDK consumers should parse the raw SSE stream to observe the cost. Streams without an explicit terminal frame do not carry the comment.","schema":{"type":"integer"}},"X-Request-ID":{"description":"Unique ID of this request; include it when contacting support","schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/ModelForbidden"},"429":{"$ref":"#/components/responses/ModelRateLimited"}},"security":[{"ApiKeyAuth":[]}],"summary":"Create message","tags":["Chat"]}},"/v1/messages/count_tokens":{"post":{"description":"Counts the input tokens of a Messages request without running it. Takes the same body as `POST /v1/messages`. The count is model-specific (4.7+ use a new tokenizer, roughly 30% more tokens for the same text) and free to use.\n","operationId":"countMessageTokens","parameters":[{"description":"Anthropic API version string","in":"header","name":"anthropic-version","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthCreateMessageParams"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"input_tokens":{"description":"The number of input tokens under the requested model's tokenizer","type":"integer"}},"required":["input_tokens"],"type":"object"}}},"description":"Successful response"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/ModelForbidden"},"429":{"$ref":"#/components/responses/ModelRateLimited"}},"security":[{"ApiKeyAuth":[]}],"summary":"Count input tokens","tags":["Chat"]}},"/v1/models":{"get":{"description":"Returns the models you can call, in an OpenAI-compatible format. A model no provider can currently serve is left out, since every request to it would fail; set `include_unavailable=true` to list it with `available: false`, or retrieve it by ID. Filters are limited to facts derivable from the catalog and enabled route pricing; category and arch are conservative derived mappings, so an unknown value is not treated as a match.\n","operationId":"listModels","parameters":[{"description":"Filter by catalog capability (tool_call, reasoning, vision, streaming, etc.).","in":"query","name":"capability","schema":{"type":"string"}},{"description":"Filter by input or output modality (text, image, audio, video).","in":"query","name":"modality","schema":{"type":"string"}},{"description":"Filter by service type (llm, embedding, tts, stt, image, rerank).","in":"query","name":"service","schema":{"type":"string"}},{"description":"Filter by lifecycle status (active, deprecated, sunset).","in":"query","name":"lifecycle","schema":{"type":"string"}},{"description":"Free-text search across model ID, name, and description.","in":"query","name":"q","schema":{"type":"string"}},{"description":"Comma-separated provider filter. providers is accepted as an alias.","in":"query","name":"provider","schema":{"type":"string"}},{"description":"Comma-separated provider filter alias; merged with provider.","in":"query","name":"providers","schema":{"type":"string"}},{"description":"Comma-separated input modalities.","in":"query","name":"input_modalities","schema":{"type":"string"}},{"description":"Comma-separated output modalities.","in":"query","name":"output_modalities","schema":{"type":"string"}},{"description":"Minimum context length in tokens. Alias of min_context; conflicting values are rejected.","in":"query","name":"context","schema":{"minimum":0,"type":"integer"}},{"description":"Minimum context length in tokens. Alias of context; conflicting values are rejected.","in":"query","name":"min_context","schema":{"minimum":0,"type":"integer"}},{"description":"Minimum input price in USD per 1M tokens, converted once to int64 Credits.","in":"query","name":"min_price","schema":{"minimum":0,"type":"number"}},{"description":"Maximum input price in USD per 1M tokens, converted once to int64 Credits.","in":"query","name":"max_price","schema":{"minimum":0,"type":"number"}},{"description":"Minimum output price in USD per 1M tokens, converted once to int64 Credits.","in":"query","name":"min_output_price","schema":{"minimum":0,"type":"number"}},{"description":"Maximum output price in USD per 1M tokens, converted once to int64 Credits.","in":"query","name":"max_output_price","schema":{"minimum":0,"type":"number"}},{"description":"Filter by derived model family (GPT, Claude, Gemini, DeepSeek, Mistral, Qwen, Other).","in":"query","name":"arch","schema":{"type":"string"}},{"description":"Filter by conservative derived category. Only programming and technology are currently classifiable; other categories return no matches.","in":"query","name":"category","schema":{"enum":["programming","roleplay","marketing","marketing/seo","technology","science","translation","legal","finance","health","trivia","academia"],"type":"string","x-speakeasy-unknown-values":"allow"}},{"description":"Comma-separated creator slugs from the model ID.","in":"query","name":"model_authors","schema":{"type":"string"}},{"description":"Minimum age in days from lifecycle.effective_since; models without that fact do not match.","in":"query","name":"min_age_days","schema":{"minimum":0,"type":"integer"}},{"description":"Maximum age in days from lifecycle.effective_since; models without that fact do not match.","in":"query","name":"max_age_days","schema":{"minimum":0,"type":"integer"}},{"description":"Supported sorts: pricing-low-to-high, pricing-high-to-low, context-high-to-low, newest. Unknown values are ignored; other OpenRouter data-backed sorts are not available in this catalog.","in":"query","name":"sort","schema":{"type":"string","x-speakeasy-unknown-values":"allow"}},{"description":"Also list catalog models that cannot be called yet, with `available: false`. Filters and sort apply to them as well.","in":"query","name":"include_unavailable","schema":{"default":false,"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelsListResponse"}}},"description":"Successful response"},"400":{"$ref":"#/components/responses/BadRequest"}},"security":[],"summary":"List models","tags":["Models"]}},"/v1/models/{creator}/{model}":{"get":{"description":"Returns detailed information about a specific model. Model IDs use the `{creator}/{model}` form, so clients must send both path segments, for example `/v1/models/openai/gpt-4o`.\n","operationId":"getModel","parameters":[{"description":"Model creator namespace (e.g. openai, anthropic)","in":"path","name":"creator","required":true,"schema":{"type":"string"}},{"description":"Model slug (e.g. gpt-4o, claude-sonnet-4)","in":"path","name":"model","required":true,"schema":{"type":"string"}},{"description":"Filter by catalog capability (tool_call, reasoning, vision, streaming, etc.).","in":"query","name":"capability","schema":{"type":"string"}},{"description":"Filter by input or output modality (text, image, audio, video).","in":"query","name":"modality","schema":{"type":"string"}},{"description":"Filter by service type (llm, embedding, tts, stt, image, rerank).","in":"query","name":"service","schema":{"type":"string"}},{"description":"Filter by lifecycle status (active, deprecated, sunset).","in":"query","name":"lifecycle","schema":{"type":"string"}},{"description":"Free-text search across model ID, name, and description.","in":"query","name":"q","schema":{"type":"string"}},{"description":"Comma-separated provider filter. providers is accepted as an alias.","in":"query","name":"provider","schema":{"type":"string"}},{"description":"Comma-separated provider filter alias; merged with provider.","in":"query","name":"providers","schema":{"type":"string"}},{"description":"Comma-separated input modalities.","in":"query","name":"input_modalities","schema":{"type":"string"}},{"description":"Comma-separated output modalities.","in":"query","name":"output_modalities","schema":{"type":"string"}},{"description":"Minimum context length filter; accepted for OpenRouter client compatibility.","in":"query","name":"context","schema":{"minimum":0,"type":"integer"}},{"description":"Alias of context; conflicting values are rejected.","in":"query","name":"min_context","schema":{"minimum":0,"type":"integer"}},{"description":"Minimum input price in USD per 1M tokens.","in":"query","name":"min_price","schema":{"minimum":0,"type":"number"}},{"description":"Maximum input price in USD per 1M tokens.","in":"query","name":"max_price","schema":{"minimum":0,"type":"number"}},{"description":"Minimum output price in USD per 1M tokens.","in":"query","name":"min_output_price","schema":{"minimum":0,"type":"number"}},{"description":"Maximum output price in USD per 1M tokens.","in":"query","name":"max_output_price","schema":{"minimum":0,"type":"number"}},{"description":"Filter by derived model family (GPT, Claude, Gemini, DeepSeek, Mistral, Qwen, Other).","in":"query","name":"arch","schema":{"type":"string"}},{"description":"Filter by conservative derived category. Only programming and technology are currently classifiable; other categories return no matches.","in":"query","name":"category","schema":{"enum":["programming","roleplay","marketing","marketing/seo","technology","science","translation","legal","finance","health","trivia","academia"],"type":"string","x-speakeasy-unknown-values":"allow"}},{"description":"Comma-separated creator slugs from the model ID.","in":"query","name":"model_authors","schema":{"type":"string"}},{"description":"Minimum age in days from lifecycle.effective_since; models without that fact do not match.","in":"query","name":"min_age_days","schema":{"minimum":0,"type":"integer"}},{"description":"Maximum age in days from lifecycle.effective_since; models without that fact do not match.","in":"query","name":"max_age_days","schema":{"minimum":0,"type":"integer"}},{"description":"Supported catalog sorts; unknown values are ignored.","in":"query","name":"sort","schema":{"type":"string","x-speakeasy-unknown-values":"allow"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelResponse"}}},"description":"Successful response"},"404":{"description":"Model not found"}},"security":[],"summary":"Retrieve model","tags":["Models"]}},"/v1/models/{creator}/{model}/availability":{"get":{"description":"Answers whether the model works right now and when it had trouble over the last 72 hours, when you leave the provider choice to the gateway and for each provider that served it. Counted the same way as `/v1/models/{creator}/{model}/stats`: `auto` counts each request that left the provider choice to the gateway by the result the caller received; each provider counts every upstream attempt it was sent, which is what a request naming that provider gets. Only rates and minute counts are published. Refreshed about once a minute.\n","operationId":"getModelAvailability","parameters":[{"in":"path","name":"creator","required":true,"schema":{"type":"string"}},{"in":"path","name":"model","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelAvailabilityResponse"}}},"description":"Successful response"},"404":{"description":"Model not found"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[],"summary":"Get recent model availability","tags":["Models"]}},"/v1/models/{creator}/{model}/endpoints":{"get":{"description":"Lists the provider endpoints that serve a model, cheapest first, with their price, limits, availability and recent measurements in OpenRouter's format. Measurements come from real traffic, are refreshed about once a minute, and are null until an endpoint has enough samples (see each field). Rate limited per IP.\n","operationId":"getModelEndpoints","parameters":[{"description":"Model creator namespace (e.g. openai, anthropic)","in":"path","name":"creator","required":true,"schema":{"type":"string"}},{"description":"Model slug (e.g. gpt-4o, claude-sonnet-4)","in":"path","name":"model","required":true,"schema":{"type":"string"}},{"description":"Compatibility parameter; the endpoint always returns the OpenRouter-compatible capability view.","in":"query","name":"format","required":false,"schema":{"enum":["openrouter"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenRouterEndpointsResponse"}}},"description":"Successful response"},"400":{"$ref":"#/components/responses/BadRequest"},"404":{"description":"Model not found"},"429":{"description":"Rate limited"}},"security":[],"summary":"Get model endpoints","tags":["Models"]}},"/v1/models/{creator}/{model}/stats":{"get":{"description":"Returns historical latency, availability, tool-call, structured-output and effective user pricing statistics for a specific model, in two units: `auto` counts each request that left the provider choice to the gateway by the result the caller received, and each provider counts every upstream attempt it was sent. Only rates, percentiles, shares and prices are published, never request or token counts. Each number is null until it rests on enough samples: rates and shares need at least 20 samples, means, percentiles and weighted prices at least 30. Refreshed about once a minute.\n","operationId":"getModelStats","parameters":[{"description":"Model creator namespace (e.g. openai, anthropic)","in":"path","name":"creator","required":true,"schema":{"type":"string"}},{"description":"Model slug (e.g. gpt-4o, claude-sonnet-4)","in":"path","name":"model","required":true,"schema":{"type":"string"}},{"description":"Historical stats window.","in":"query","name":"period","required":false,"schema":{"default":"30d","enum":["7d","30d","90d"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelHistoricalStatsResponse"}}},"description":"Successful response"},"400":{"$ref":"#/components/responses/BadRequest"},"404":{"description":"Model not found"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[],"summary":"Get model historical stats","tags":["Models"]}},"/v1/models/{creator}/{model}:generateContent":{"post":{"description":"Google Gemini `generateContent`, the endpoint the Google Gen AI SDKs call with base URL `https://api.ohmygpt.com` and API version `v1`. The model ID goes in the path, slash included: `/v1/models/google/gemini-3.1-flash-lite:generateContent`. Prefix it with `provider:` to pin one provider, as in `/v1/models/google:google/gemini-3.1-flash-lite:generateContent`. Gemini models and every other chat model in the catalog accept the same request and answer with a `GenerateContentResponse`.\n","operationId":"generateContent","parameters":[{"$ref":"#/components/parameters/GeminiModelCreator"},{"$ref":"#/components/parameters/GeminiModelName"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeminiGenerateContentRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateContentResponse"}}},"description":"Successful response","headers":{"X-Cost-Credits":{"description":"Final cost of this request in Credits.","schema":{"type":"integer"}},"X-Request-ID":{"description":"Unique ID of this request; include it when contacting support","schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/GeminiBadRequest"},"401":{"$ref":"#/components/responses/GeminiUnauthorized"},"402":{"$ref":"#/components/responses/GeminiPaymentRequired"},"403":{"$ref":"#/components/responses/GeminiForbidden"},"429":{"$ref":"#/components/responses/GeminiRateLimited"}},"security":[{"ApiKeyAuth":[]},{"GoogleApiKeyAuth":[]}],"summary":"Generate content (Gemini)","tags":["Chat"]}},"/v1/models/{creator}/{model}:streamGenerateContent":{"post":{"description":"The streaming form of `generateContent`: the same request, answered as server-sent events, each `data:` line one `GenerateContentResponse` chunk. The stream has no terminal frame, so it carries no cost comment; the request's cost is in the usage records (`GET /v1/generation`).\n","operationId":"streamGenerateContent","parameters":[{"$ref":"#/components/parameters/GeminiModelCreator"},{"$ref":"#/components/parameters/GeminiModelName"},{"description":"The Google Gen AI SDKs send `alt=sse`. The response is server-sent events either way.","in":"query","name":"alt","required":false,"schema":{"enum":["sse"],"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeminiGenerateContentRequest"}}},"required":true},"responses":{"200":{"content":{"text/event-stream":{"schema":{"$ref":"#/components/schemas/GenerateContentResponse"}}},"description":"Server-sent events; each `data:` line is a `GenerateContentResponse` chunk","headers":{"X-Request-ID":{"description":"Unique ID of this request; include it when contacting support","schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/GeminiBadRequest"},"401":{"$ref":"#/components/responses/GeminiUnauthorized"},"402":{"$ref":"#/components/responses/GeminiPaymentRequired"},"403":{"$ref":"#/components/responses/GeminiForbidden"},"429":{"$ref":"#/components/responses/GeminiRateLimited"}},"security":[{"ApiKeyAuth":[]},{"GoogleApiKeyAuth":[]}],"summary":"Stream generated content (Gemini)","tags":["Chat"]}},"/v1/moderations":{"post":{"description":"Classify text and images against the model's content policy categories, in the OpenAI Moderations format.","operationId":"createModeration","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateModerationRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateModerationResponse"}}},"description":"Successful response","headers":{"X-Cost-Credits":{"description":"Final cost of this request in Credits.","schema":{"type":"integer"}},"X-Request-ID":{"description":"Unique ID of this request; include it when contacting support","schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/ModelForbidden"},"429":{"$ref":"#/components/responses/ModelRateLimited"}},"security":[{"ApiKeyAuth":[]}],"summary":"Create moderation","tags":["Moderations"]}},"/v1/ocr":{"post":{"description":"Extract the text of a document or image. Send the document in the model's own field: `file` (a URL or base64 data) for Zhipu GLM-OCR, `document` for Mistral OCR. Other fields go to the model unchanged, and the response is the model's own. Billed per page or by tokens, as listed in each model's pricing.\n","operationId":"createOcr","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OcrRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object"}}},"description":"The model's OCR result","headers":{"X-Cost-Credits":{"description":"Final cost of this request in Credits.","schema":{"type":"integer"}},"X-Request-ID":{"description":"Unique ID of this request; include it when contacting support","schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/ModelForbidden"},"429":{"$ref":"#/components/responses/ModelRateLimited"}},"security":[{"ApiKeyAuth":[]}],"summary":"Recognize document text","tags":["OCR"]}},"/v1/quotes":{"get":{"description":"Returns what the authenticated caller pays when requesting this model string, route by route, including contract pricing. Prices come from the same implementation that charges requests. A request is charged at the price of the route that serves it.\n","operationId":"getQuote","parameters":[{"description":"Model string exactly as it would be sent in a request (short name, model ID, or provider-qualified ID).","in":"query","name":"model","required":true,"schema":{"type":"string"}},{"description":"Inbound API to price, such as openai-completions or openai-responses. Defaults to the model's own API.","in":"query","name":"api","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteResponse"}}},"description":"Effective prices."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get effective prices for a model string","tags":["Billing"]}},"/v1/rankings/models":{"get":{"description":"Every public model with traffic over the last 7 days, ranked by tokens served: rank, share of tokens, success rate and median time to first token. Success rate and TTFT are null until the model has at least 100 samples in the window: models are compared against each other here, so the floor is higher than for a single model's stats. Success rate and TTFT follow the model uptime rules (one sample per request that left the provider choice to the gateway, final outcome, caller errors excluded); token share counts every request.\n","operationId":"getModelRankings","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelRankingsResponse"}}},"description":"Successful response"},"429":{"description":"Rate limited"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[],"summary":"Get model rankings","tags":["Models"]}},"/v1/rankings/models/weekly":{"get":{"description":"Each public model's share of the tokens served in each ISO week (Monday 00:00 UTC start) for a stacked \"top models\" chart, plus this week's leaderboard. The chart draws the 10 models with the most tokens over the window and folds every other public model into other_share. The leaderboard lists the 20 models with the most tokens this week so far, with their rank and share, each compared with last week over the same span (Monday 00:00 UTC up to as_of), so a week in progress is not mistaken for a decline. change_pct is null until both spans have at least 20 requests. Same scope as /v1/rankings/models. Refreshed about once an hour.\n","operationId":"getWeeklyModelRankings","parameters":[{"description":"Number of weeks to chart, ending with the current week.","in":"query","name":"weeks","required":false,"schema":{"default":12,"maximum":52,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WeeklyModelRankingsResponse"}}},"description":"Successful response"},"400":{"$ref":"#/components/responses/BadRequest"},"429":{"description":"Rate limited"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[],"summary":"Get weekly model usage","tags":["Models"]}},"/v1/realtime/calls":{"post":{"description":"Exchanges a WebRTC SDP offer for an OpenAI Realtime SDP answer. Audio and the `oai-events` data channel then flow between the client and the model; each response is billed as it finishes. Authenticate with an API key or a client secret. Send the offer as `multipart/form-data` with `sdp` and `session` fields, or as `application/sdp` with the model in the `model` query parameter. With a client secret, the model and session settings come from the secret.\n","operationId":"createRealtimeCall","parameters":[{"description":"Model ID used when the `session` field omits `model`.","in":"query","name":"model","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/sdp":{"schema":{"description":"WebRTC SDP offer.","type":"string"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/RealtimeCallRequest"}}},"required":true},"responses":{"201":{"content":{"application/sdp":{"schema":{"type":"string"}}},"description":"The SDP answer. `Location` is `/v1/realtime/calls/{call_id}`.","headers":{"Location":{"schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/ModelForbidden"},"429":{"$ref":"#/components/responses/ModelRateLimited"},"502":{"$ref":"#/components/responses/BadGateway"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"ApiKeyAuth":[]}],"summary":"Start a Realtime WebRTC call","tags":["Realtime"]}},"/v1/realtime/client_secrets":{"post":{"description":"Creates a short-lived client secret for browsers and mobile apps: open a session at `wss://api.ohmygpt.com/v1/realtime` with it in place of your API key. The model and session settings are fixed when it is created and applied when the session opens. Set the model in `session.model` or the top-level `model` field.\n","operationId":"createRealtimeClientSecret","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RealtimeClientSecretRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RealtimeClientSecretResponse"}}},"description":"The client secret and its session configuration."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/ModelForbidden"},"429":{"$ref":"#/components/responses/ModelRateLimited"},"502":{"$ref":"#/components/responses/BadGateway"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"ApiKeyAuth":[]}],"summary":"Create Realtime client secret","tags":["Realtime"]}},"/v1/rerank":{"post":{"description":"Orders documents by how relevant each is to a query, in the Cohere and Jina rerank format. `model`, `query` and `documents` are read; every other field (`top_n`, `return_documents`, `max_tokens_per_doc` and so on) is passed to the model unchanged, and the response is the model's own. Billed per query or per token, whichever the model's price in `GET /v1/models` lists.\n","operationId":"rerank","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RerankRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RerankResponse"}}},"description":"Successful response","headers":{"X-Cost-Credits":{"description":"Final cost of this request in Credits.","schema":{"type":"integer"}},"X-Request-ID":{"description":"Unique ID of this request; include it when contacting support","schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/ModelForbidden"},"429":{"$ref":"#/components/responses/ModelRateLimited"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"ApiKeyAuth":[]}],"summary":"Rerank documents","tags":["Rerank"]}},"/v1/responses":{"get":{"description":"Lists stored responses owned by the authenticated user, newest first. Deleted responses are excluded; every stored status is returned. Use `after` with the previous page's `last_id` to page backwards. Requires an admin API key or the console session; other keys get 403 and can still retrieve a response by its ID.\n","operationId":"listResponses","parameters":[{"description":"Maximum number of responses to return.","in":"query","name":"limit","required":false,"schema":{"default":20,"maximum":100,"minimum":1,"type":"integer"}},{"description":"Response ID cursor from the previous page's `last_id`.","in":"query","name":"after","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoredResponseList"}}},"description":"Stored responses"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/ModelRateLimited"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"ApiKeyAuth":[]}],"summary":"List stored responses","tags":["Chat"]},"post":{"description":"OpenAI-compatible Responses API. Responses are stored by default and can be read back with the response retrieval endpoints. Explicit `store:false` opts out of storage. When stored, the returned `id` is an OhMyGPT response ID; use it for `previous_response_id` and the retrieval endpoints.\n","operationId":"createResponse","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateResponse"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayResponsesResponse"}}},"description":"Successful response","headers":{"X-Cost-Credits":{"description":"Non-streaming responses include the final cost in Credits via this header; for streaming responses with an explicit terminal frame (OpenAI [DONE], Anthropic message_stop, Responses completed), the final cost is transmitted as an SSE comment line (': x-cost-credits: N') immediately before the terminal frame. Comments are skipped by SSE parsers, so SDK consumers should parse the raw SSE stream to observe the cost. Streams without an explicit terminal frame do not carry the comment.","schema":{"type":"integer"}},"X-Request-ID":{"description":"Unique ID of this request; include it when contacting support","schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/ModelForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"429":{"$ref":"#/components/responses/ModelRateLimited"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"ApiKeyAuth":[]}],"summary":"Create response","tags":["Chat"]}},"/v1/responses/{response_id}":{"delete":{"description":"Deletes a locally stored response. Deleted, nonexistent, and cross-tenant responses all return the same not found boundary.\n","operationId":"deleteResponse","parameters":[{"description":"Response ID returned by `POST /v1/responses`.","in":"path","name":"response_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseDeleteResult"}}},"description":"Stored response deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/ModelRateLimited"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"ApiKeyAuth":[]}],"summary":"Delete stored response","tags":["Chat"]},"get":{"description":"Returns a response previously created without `store:false`. Only responses owned by the authenticated user are visible. The response `id` and `previous_response_id` fields use OhMyGPT response IDs.\n","operationId":"getResponse","parameters":[{"description":"Response ID returned by `POST /v1/responses`.","in":"path","name":"response_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayResponsesResponse"}}},"description":"Stored response"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/ModelRateLimited"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"ApiKeyAuth":[]}],"summary":"Retrieve stored response","tags":["Chat"]}},"/v1/responses/{response_id}/cancel":{"post":{"description":"Cancels a locally stored response while it is still `in_progress`. Completed, failed, incomplete, cancelled, deleted, nonexistent, and cross-tenant responses are not mutable through this endpoint.\n","operationId":"cancelResponse","parameters":[{"description":"Response ID returned by `POST /v1/responses`.","in":"path","name":"response_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayResponsesResponse"}}},"description":"Cancelled stored response"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/ModelRateLimited"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"ApiKeyAuth":[]}],"summary":"Cancel stored response","tags":["Chat"]}},"/v1/responses/{response_id}/input_items":{"get":{"description":"Returns the expanded input items stored for a response created without `store:false`.\n","operationId":"listResponseInputItems","parameters":[{"description":"Response ID returned by `POST /v1/responses`.","in":"path","name":"response_id","required":true,"schema":{"type":"string"}},{"description":"Maximum number of input items to return.","in":"query","name":"limit","required":false,"schema":{"default":20,"maximum":100,"minimum":1,"type":"integer"}},{"description":"Return items after this input item ID.","in":"query","name":"after","required":false,"schema":{"type":"string"}},{"description":"Item order within the stored input list.","in":"query","name":"order","required":false,"schema":{"default":"asc","enum":["asc","desc"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseInputItemsList"}}},"description":"Stored input items"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/ModelRateLimited"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"ApiKeyAuth":[]}],"summary":"List stored response input items","tags":["Chat"]}},"/v1/status/incidents":{"get":{"description":"Returns active public incidents plus resolved incidents from the last 30 days, capped at 50 items.","operationId":"listStatusIncidents","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IncidentListEnvelope"}}},"description":"Successful response"}},"security":[],"summary":"List incidents","tags":["Status"]}},"/v1/status/incidents/{id}":{"get":{"description":"Returns a public incident and its update timeline when the incident is active or resolved within the last 30 days.","operationId":"getStatusIncident","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IncidentDetailEnvelope"}}},"description":"Successful response"},"404":{"$ref":"#/components/responses/NotFound"}},"security":[],"summary":"Retrieve incident","tags":["Status"]}},"/v1/status/models/{creator}/{model}":{"get":{"description":"Returns route-level success rate, latency, and TTFT time series for one model. A bucket's success_rate is null until it has at least 20 requests; its latency fields are omitted until it has at least 30 requests, and its TTFT fields until it has at least 30 first-token samples.\n","operationId":"getStatusModel","parameters":[{"description":"Model creator namespace (e.g. openai, anthropic)","in":"path","name":"creator","required":true,"schema":{"type":"string"}},{"description":"Model slug (e.g. gpt-4o, claude-sonnet-4)","in":"path","name":"model","required":true,"schema":{"type":"string"}},{"in":"query","name":"bucket","required":false,"schema":{"default":"1h","enum":["1h","1d"],"type":"string"}},{"description":"RFC3339 or Unix start time; the window ends now. Defaults to 24 hours ago and may reach back at most 31 days.\n","in":"query","name":"since","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelRouteDetailEnvelope"}}},"description":"Successful response"},"400":{"$ref":"#/components/responses/BadRequest"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[],"summary":"Get model route time series","tags":["Status"]}},"/v1/status/summary":{"get":{"description":"Returns global public status, component summaries, active incidents, and maintenance windows.","operationId":"getStatusSummary","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusSummaryEnvelope"}}},"description":"Successful response"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpxErrorResponse"}}},"description":"Status page read model unavailable"}},"security":[],"summary":"Get status summary","tags":["Status"]}},"/v1/status/uptime":{"get":{"description":"Returns public daily uptime percentages for status page components. A percentage is null until it rests on at least 20 samples, so \"not enough data\" is never shown as 100%.\n","operationId":"getStatusUptime","parameters":[{"in":"query","name":"days","required":false,"schema":{"maximum":365,"minimum":1,"type":"integer"}},{"in":"query","name":"group_by","required":false,"schema":{"default":"provider","enum":["provider","model"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UptimeEnvelope"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpxErrorResponse"}}},"description":"Invalid status page query parameters"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpxErrorResponse"}}},"description":"Status page uptime read model unavailable"}},"security":[],"summary":"Get uptime heatmap","tags":["Status"]}},"/v1/usage":{"get":{"description":"Returns the current user's usage records, newest first. JSON, NDJSON, and CSV are selected by the Accept header. To export a time range, pass since and until and request pages of up to 10,000 records, following X-Next-Cursor until it is absent; with CSV, keep the header row of the first page only. Requires an admin API key (turn on Admin key on the API Keys page) or the console session; other keys get 403. Limited to 120 requests per minute per account, with bursts of 20; on 429, wait for Retry-After and resend the same page.\n","operationId":"listUsage","parameters":[{"description":"Start time in RFC3339.","in":"query","name":"since","schema":{"format":"date-time","type":"string"}},{"description":"End time in RFC3339.","in":"query","name":"until","schema":{"format":"date-time","type":"string"}},{"in":"query","name":"model","schema":{"type":"string"}},{"description":"Exact request ID match.","in":"query","name":"request_id","schema":{"type":"string"}},{"in":"query","name":"usage_kind","schema":{"$ref":"#/components/schemas/UsageKind"}},{"in":"query","name":"status","schema":{"enum":["success","error"],"type":"string"}},{"in":"query","name":"billing_status","schema":{"enum":["final","failed"],"type":"string"}},{"description":"Exact match on UsageItem.credential_id, the API key that made the request.","in":"query","name":"credential_id","schema":{"type":"string"}},{"in":"query","name":"auth_method","schema":{"enum":["sk-v1","jwt-v1","oauth-v1"],"type":"string"}},{"description":"Label filter. Matches usage records whose labels.cost_center equals this value.","in":"query","name":"cost_center","schema":{"maxLength":128,"type":"string"}},{"description":"Label filter. Matches usage records whose labels.project equals this value.","in":"query","name":"project","schema":{"maxLength":128,"type":"string"}},{"description":"Label filter. Matches usage records whose labels.environment equals this value.","in":"query","name":"environment","schema":{"maxLength":128,"type":"string"}},{"description":"Label filter. Matches usage records whose labels.app_url equals this value.","in":"query","name":"app_url","schema":{"maxLength":128,"type":"string"}},{"description":"Label filter. Matches usage records whose labels.app_title equals this value.","in":"query","name":"app_title","schema":{"maxLength":128,"type":"string"}},{"description":"Label filter. Matches usage records whose labels.app_categories equals this value.","in":"query","name":"app_categories","schema":{"maxLength":128,"type":"string"}},{"description":"Label filter. Matches usage records whose labels.sdk_info equals this value.","in":"query","name":"sdk_info","schema":{"maxLength":128,"type":"string"}},{"description":"Custom label filter pattern. Replace {key} with a custom label name, for example label.team=core.","in":"query","name":"label.{key}","schema":{"maxLength":128,"type":"string"}},{"in":"query","name":"cursor","schema":{"type":"string"}},{"description":"Records per page. Larger values are capped at 10,000.","in":"query","name":"limit","schema":{"default":100,"maximum":10000,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/UsageItem"},"type":"array"}},"application/x-ndjson":{"schema":{"type":"string"}},"text/csv":{"schema":{"type":"string"}}},"description":"Usage records.","headers":{"Link":{"description":"RFC5988 next-page link when more records exist.","schema":{"type":"string"}},"X-Next-Cursor":{"description":"Cursor for the next page, when more records exist.","schema":{"type":"string"}},"X-Total-Count":{"description":"Estimated count for the first page when available.","schema":{"format":"int64","type":"integer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/AccountUsageForbidden"},"406":{"$ref":"#/components/responses/NotAcceptable"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"ApiKeyAuth":[]}],"summary":"List usage records","tags":["Usage"]}},"/v1/usage/summary":{"get":{"description":"Aggregates the current user's usage by model, provider, route, status, API key (credential), inbound API (api), or label:{key}. Filters combine, for example group_by=credential&model=X gives spend per key for one model. JSON, NDJSON, and CSV are selected by the Accept header. Requires an admin API key or the console session; other keys get 403.\n","operationId":"getUsageSummary","parameters":[{"description":"credential groups by the API key that made the request; group_key is UsageItem.credential_id, or an empty string for requests not made with an API key (console sessions, OAuth apps), and key_hint carries the key's mask. api groups by UsageItem.input_api; group_key is an empty string for records without it.\n","in":"query","name":"group_by","required":true,"schema":{"description":"model, provider, route, status, credential, api, or label:{key}, where key is cost_center, project, environment, app_url, app_title, app_categories, or sdk_info\n","type":"string"}},{"in":"query","name":"bucket","schema":{"$ref":"#/components/schemas/UsageTimeBucket"}},{"description":"IANA time zone, such as Asia/Shanghai, that cuts the buckets: a 1d bucket runs from local midnight to local midnight, a 7d bucket starts on local Monday. time_bucket is still an RFC3339 instant.\n","in":"query","name":"tz","schema":{"default":"UTC","type":"string"}},{"description":"scope=byok switches to the BYOK summary view.","in":"query","name":"scope","schema":{"enum":["byok"],"type":"string"}},{"description":"RFC3339 or YYYY-MM-DD.","in":"query","name":"since","schema":{"type":"string"}},{"description":"RFC3339 or YYYY-MM-DD.","in":"query","name":"until","schema":{"type":"string"}},{"description":"Exact match on UsageItem.credential_id, the API key that made the request.","in":"query","name":"credential_id","schema":{"type":"string"}},{"description":"Exact model match. Aliases resolve to the canonical model ID the same way as the model filter on /v1/usage.","in":"query","name":"model","schema":{"type":"string"}},{"description":"Exact provider match, using the group_key values of group_by=provider.","in":"query","name":"provider","schema":{"type":"string"}},{"in":"query","name":"auth_method","schema":{"enum":["sk-v1","jwt-v1","oauth-v1"],"type":"string"}},{"description":"Label filter. Matches usage records whose labels.cost_center equals this value.","in":"query","name":"cost_center","schema":{"maxLength":128,"type":"string"}},{"description":"Label filter. Matches usage records whose labels.project equals this value.","in":"query","name":"project","schema":{"maxLength":128,"type":"string"}},{"description":"Label filter. Matches usage records whose labels.environment equals this value.","in":"query","name":"environment","schema":{"maxLength":128,"type":"string"}},{"description":"Label filter. Matches usage records whose labels.app_url equals this value.","in":"query","name":"app_url","schema":{"maxLength":128,"type":"string"}},{"description":"Label filter. Matches usage records whose labels.app_title equals this value.","in":"query","name":"app_title","schema":{"maxLength":128,"type":"string"}},{"description":"Label filter. Matches usage records whose labels.app_categories equals this value.","in":"query","name":"app_categories","schema":{"maxLength":128,"type":"string"}},{"description":"Label filter. Matches usage records whose labels.sdk_info equals this value.","in":"query","name":"sdk_info","schema":{"maxLength":128,"type":"string"}},{"description":"Custom label filter pattern. Replace {key} with a custom label name, for example label.team=core.","in":"query","name":"label.{key}","schema":{"maxLength":128,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/UsageSummaryResponse"},{"$ref":"#/components/schemas/BYOKUsageSummary"}]}},"application/x-ndjson":{"schema":{"type":"string"}},"text/csv":{"schema":{"type":"string"}}},"description":"Usage summary. scope=byok returns the BYOK summary schema."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/AccountUsageForbidden"},"406":{"$ref":"#/components/responses/NotAcceptable"},"429":{"$ref":"#/components/responses/RateLimited"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get usage summary","tags":["Usage"]}},"/v1/usage/top":{"get":{"description":"Ranks usage by model, provider, or label:{key}. JSON, NDJSON, and CSV are selected by the Accept header. Requires an admin API key or the console session; other keys get 403.\n","operationId":"getUsageTop","parameters":[{"in":"query","name":"dimension","required":true,"schema":{"description":"model, provider, or label:{key}, where key is cost_center, project, environment, app_url, app_title, app_categories, or sdk_info\n","type":"string"}},{"in":"query","name":"metric","schema":{"default":"cost_credits","enum":["cost_credits","requests","error_rate","latency_p95","tokens"],"type":"string"}},{"in":"query","name":"limit","schema":{"default":10,"maximum":100,"type":"integer"}},{"in":"query","name":"order","schema":{"default":"desc","enum":["desc","asc"],"type":"string"}},{"description":"RFC3339 or YYYY-MM-DD.","in":"query","name":"since","schema":{"type":"string"}},{"description":"RFC3339 or YYYY-MM-DD.","in":"query","name":"until","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageTopResponse"}},"application/x-ndjson":{"schema":{"type":"string"}},"text/csv":{"schema":{"type":"string"}}},"description":"Top-N usage ranking."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/AccountUsageForbidden"},"406":{"$ref":"#/components/responses/NotAcceptable"},"429":{"$ref":"#/components/responses/RateLimited"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get usage top ranking","tags":["Usage"]}},"/v1/videos":{"get":{"description":"Your video jobs, newest first. Requires an admin API key or the console session; other keys get 403 and can still retrieve a job by its ID.\n","operationId":"listVideos","parameters":[{"description":"Jobs per page.","in":"query","name":"limit","required":false,"schema":{"default":20,"maximum":100,"minimum":1,"type":"integer"}},{"description":"The `next_cursor` of the previous page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoJobList"}}},"description":"Successful response"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/AccountUsageForbidden"}},"security":[{"ApiKeyAuth":[]}],"summary":"List videos","tags":["Videos"]},"post":{"description":"Start a video generation job and return it right away; poll `GET /v1/videos/{id}` until `status` is `completed`, then download it from `GET /v1/videos/{id}/content`. The price is fixed when the job is created, from `seconds` and `size`. Cancelled and failed jobs are not charged, except a job a provider's content policy blocks where that provider charges for it. `seconds` takes the values in the model's `limits.video.seconds`; `size` takes the sizes its pricing lists. A repeated `Idempotency-Key` returns the job it first created.\n","operationId":"createVideo","parameters":[{"description":"Any unique string per job, such as a UUID. Retrying with the same key returns the same job instead of starting a second one.","in":"header","name":"Idempotency-Key","required":true,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoCreateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoJob"}}},"description":"The created job, or the job this Idempotency-Key created before","headers":{"X-Request-ID":{"description":"Unique ID of this request; include it when contacting support","schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/ModelForbidden"},"429":{"$ref":"#/components/responses/ModelRateLimited"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"ApiKeyAuth":[]}],"summary":"Create video","tags":["Videos"]}},"/v1/videos/{id}":{"delete":{"description":"Clear the job's stored result once its download has expired; until then this answers `409`. A job without a result succeeds right away. The job stays in your list.","operationId":"deleteVideo","parameters":[{"$ref":"#/components/parameters/VideoID"}],"responses":{"204":{"description":"Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/VideoNotFound"},"409":{"$ref":"#/components/responses/VideoNotReady"}},"security":[{"ApiKeyAuth":[]}],"summary":"Delete video","tags":["Videos"]},"get":{"description":"One video job. Reading a job does not call the provider; the job updates on its own as the provider reports progress.","operationId":"getVideo","parameters":[{"$ref":"#/components/parameters/VideoID"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoJob"}}},"description":"Successful response"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/VideoNotFound"}},"security":[{"ApiKeyAuth":[]}],"summary":"Retrieve video","tags":["Videos"]}},"/v1/videos/{id}/cancel":{"post":{"description":"Cancel a job that is still queued; a cancelled job is not charged. Models whose provider cannot cancel answer `501`, and a job already being generated answers `409`.\n","operationId":"cancelVideo","parameters":[{"$ref":"#/components/parameters/VideoID"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoJob"}}},"description":"The cancelled job"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/VideoNotFound"},"409":{"$ref":"#/components/responses/Conflict"},"501":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}},"description":"This model's provider cannot cancel jobs."}},"security":[{"ApiKeyAuth":[]}],"summary":"Cancel video","tags":["Videos"]}},"/v1/videos/{id}/content":{"get":{"description":"The finished video file. Available while `result_available` is true, until `result_url_expires_at` (usually 24 hours after the job finishes).\n","operationId":"getVideoContent","parameters":[{"$ref":"#/components/parameters/VideoID"}],"responses":{"200":{"content":{"video/*":{"schema":{"format":"binary","type":"string"}}},"description":"The video file, such as `video/mp4`"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/VideoNotFound"},"409":{"$ref":"#/components/responses/VideoNotReady"},"410":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}},"description":"The download expired (error type `result_expired`)."},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}},"description":"The video could not be fetched from the provider (error type `result_fetch_blocked`)."}},"security":[{"ApiKeyAuth":[]}],"summary":"Download video","tags":["Videos"]}}},"security":[{"ApiKeyAuth":[]}],"servers":[{"description":"Production","url":"https://api.ohmygpt.com"}],"tags":[{"description":"Chat Completions, Responses, and Messages, plus stored responses and token counting","name":"Chat"},{"description":"Vector representations of text","name":"Embeddings"},{"description":"Image generation","name":"Images"},{"description":"Text to speech and speech to text","name":"Audio"},{"description":"Video generation jobs","name":"Videos"},{"description":"Documents ordered by relevance to a query","name":"Rerank"},{"description":"Content policy classification","name":"Moderations"},{"description":"Text recognition in documents and images","name":"OCR"},{"description":"OpenAI Realtime client secrets and WebRTC calls","name":"Realtime"},{"description":"The model catalog, each model's provider endpoints and measurements, and rankings","name":"Models"},{"description":"Request records, request receipts, and aggregate usage reports","name":"Usage"},{"description":"Credits, cost estimates, effective prices, and currency rates","name":"Billing"},{"description":"The authenticated account","name":"Account"},{"description":"Public status page data and incidents","name":"Status"},{"description":"Messages to the OhMyGPT team","name":"Contact"}],"x-ohmygpt-opaque-upstream-schemas":[{"name":"ApplyPatchCallOutputStatusParam","reason":"Deep OpenAI Responses apply_patch tool enum outside the documented gateway contract."},{"name":"ApplyPatchCallStatusParam","reason":"Deep OpenAI Responses apply_patch tool enum outside the documented gateway contract."},{"name":"ApplyPatchOperationParam","reason":"Deep OpenAI Responses apply_patch operation object outside the documented gateway contract."},{"name":"ApplyPatchToolParam","reason":"Deep OpenAI Responses apply_patch tool object outside the documented gateway contract."},{"name":"ClickParam","reason":"Deep OpenAI Responses computer-use action object outside the documented gateway contract."},{"name":"CodeInterpreterTool","reason":"Deep OpenAI Responses hosted tool object outside the documented gateway contract."},{"name":"ComputerScreenshotImage","reason":"Deep OpenAI Responses computer-use image object outside the documented gateway contract."},{"name":"ComputerUsePreviewTool","reason":"Deep OpenAI Responses hosted tool object outside the documented gateway contract."},{"name":"ContainerReferenceParam","reason":"Deep OpenAI Responses container reference object outside the documented gateway contract."},{"name":"Conversation-2","reason":"Deep OpenAI Responses conversation object outside the documented gateway contract."},{"name":"ConversationParam-2","reason":"Deep OpenAI Responses conversation parameter object outside the documented gateway contract."},{"name":"CustomToolParam","reason":"Deep OpenAI Responses custom tool parameter object outside the documented gateway contract."},{"name":"DoubleClickAction","reason":"Deep OpenAI Responses computer-use action object outside the documented gateway contract."},{"name":"DragParam","reason":"Deep OpenAI Responses computer-use action object outside the documented gateway contract."},{"name":"FileSearchTool","reason":"Deep OpenAI Responses file search tool object outside the documented gateway contract."},{"name":"FunctionAndCustomToolCallOutput","reason":"Deep OpenAI Responses tool-call output object outside the documented gateway contract."},{"name":"FunctionShellActionParam","reason":"Deep OpenAI Responses shell action object outside the documented gateway contract."},{"name":"FunctionShellCallItemStatus","reason":"Deep OpenAI Responses shell call status enum outside the documented gateway contract."},{"name":"FunctionShellCallOutputContentParam","reason":"Deep OpenAI Responses shell call output content outside the documented gateway contract."},{"name":"FunctionShellCallOutputExitOutcome","reason":"Deep OpenAI Responses shell call outcome object outside the documented gateway contract."},{"name":"FunctionShellCallOutputTimeoutOutcome","reason":"Deep OpenAI Responses shell call outcome object outside the documented gateway contract."},{"name":"FunctionShellToolParam","reason":"Deep OpenAI Responses shell tool parameter object outside the documented gateway contract."},{"name":"ImageGenTool","reason":"Deep OpenAI Responses image generation tool object outside the documented gateway contract."},{"name":"KeyPressAction","reason":"Deep OpenAI Responses computer-use action object outside the documented gateway contract."},{"name":"LocalEnvironmentParam","reason":"Deep OpenAI Responses local environment object outside the documented gateway contract."},{"name":"LocalShellToolParam","reason":"Deep OpenAI Responses shell tool parameter object outside the documented gateway contract."},{"name":"MCPTool","reason":"Deep OpenAI Responses MCP tool object outside the documented gateway contract."},{"name":"MoveParam","reason":"Deep OpenAI Responses computer-use action object outside the documented gateway contract."},{"name":"ScreenshotParam","reason":"Deep OpenAI Responses computer-use action object outside the documented gateway contract."},{"name":"ScrollParam","reason":"Deep OpenAI Responses computer-use action object outside the documented gateway contract."},{"name":"TypeParam","reason":"Deep OpenAI Responses computer-use action object outside the documented gateway contract."},{"name":"WaitParam","reason":"Deep OpenAI Responses computer-use action object outside the documented gateway contract."},{"name":"WebSearchPreviewTool","reason":"Deep OpenAI Responses web search preview tool object outside the documented gateway contract."},{"name":"WebSearchTool","reason":"Deep OpenAI Responses web search tool object outside the documented gateway contract."}]}