{"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"}}},"responses":{"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."},"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)"}},"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"},"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"},"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"},"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"}]},"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"},"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"},"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"},"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"},"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":{"properties":{"max_completion_tokens":{"type":"integer"},"max_tokens":{"type":"integer"},"messages":{"items":{},"type":"array"},"model":{"type":"string"}},"required":["model"],"type":"object"},"CostEstimateResult":{"properties":{"confidence":{"type":"string"},"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","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"},"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"}]},"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"}]},"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"},"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"}},"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"},"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"},"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"},"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"},"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"},"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"},"GenerationLookupEnvelope":{"properties":{"data":{"$ref":"#/components/schemas/RequestReceipt"}},"required":["data"],"type":"object"},"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"},"ImageDetail":{"enum":["low","high","auto"],"type":"string"},"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"},"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"},"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"},"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"},"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"},"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"},"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"},"model_id":{"type":"string"},"overall":{"allOf":[{"$ref":"#/components/schemas/AvailabilityTrack"}],"description":"Every request for the model, whoever chose the provider."},"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","overall","providers"],"type":"object"},"ModelHistoricalAutoMetrics":{"description":"Every request for this model, whoever chose the provider, by the result the caller received. The gateway moves a failed request to another provider when it can, so a request succeeds when any provider serves it: these numbers are not an average of the providers and cannot be derived from them.\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":"Null until at least 20 attempts asked for structured output.","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":"Null until at least 20 attempts asked for tool calls.","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"},"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"},"stream_idle_timeout":{"type":"integer"}},"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"},"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. Unavailable models can still 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"},"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"},"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"},"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"}]},"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":{"model":{"description":"OhMyGPT model ID. Used when `session.model` is omitted.","type":"string"},"session":{"$ref":"#/components/schemas/RealtimeSession"}},"type":"object"},"RealtimeClientSecretResponse":{"additionalProperties":true,"properties":{"client_secret":{"additionalProperties":true,"properties":{"expires_at":{"format":"int64","type":"integer"},"value":{"type":"string"}},"type":"object"}},"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"}]},"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"},"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_id":{"type":"string"},"status":{"enum":["succeeded","failed","partial","unknown"],"type":"string"},"timing":{"$ref":"#/components/schemas/ReceiptTiming"},"usage":{"$ref":"#/components/schemas/ReceiptUsage"}},"required":["object","id","request_id","created_at","status","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},"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"}},"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},"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"},"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"},"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"},"StatusProviderComponent":{"properties":{"description":{"type":"string"},"last_live_at":{"format":"date-time","type":"string"},"name":{"type":"string"},"status":{"$ref":"#/components/schemas/PageStatus"}},"required":["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"},"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"},"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"},"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"},"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"},"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"},"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"},"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, every request for the model counts once by the result the caller received, whoever chose the provider. The gateway moves a failed request to another provider when it can, so a request succeeds when any provider serves it.\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, i.e. days with a non-null uptime_pct.","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":{"properties":{"date":{"format":"date","type":"string"},"uptime_pct":{"description":"Availability (%) that day; null until there are at least 20 samples, meaning not enough data rather than 100%.","nullable":true,"type":"number"}},"required":["date","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"},"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"}},"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"},"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"},"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"}]},"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"}},"securitySchemes":{"ApiKeyAuth":{"in":"header","name":"Authorization","type":"apiKey"},"BearerAuth":{"bearerFormat":"JWT","scheme":"bearer","type":"http"}}},"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/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/cost-estimates":{"post":{"description":"Estimates the upper-bound request cost without sending a provider request or charging the account. The model string is resolved the same way a request is, and the estimate uses the most expensive of the routes that could serve it at the caller's effective price (including contract pricing), because the serving route depends on availability at request time. Time-window pricing (peak/off-peak) is resolved at the current UTC time, so the estimate uses the tier that a request would be billed at right now.\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/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 available models in an OpenAI-compatible format. 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"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelsListResponse"}}},"description":"Successful response"}},"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, for the model as a whole and for each provider that served it. Counted the same way as `/v1/models/{creator}/{model}/stats`: `overall` counts every request for the model by the result the caller received, whoever chose the provider; each provider counts every upstream attempt it was sent. Only rates and minute counts are published.\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"}},"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.\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"}},"security":[],"summary":"Get model historical stats","tags":["Models"]}},"/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. Samples follow the model uptime rules (one per request, final outcome, caller errors excluded); token share counts the same requests.\n","operationId":"getModelRankings","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelRankingsResponse"}}},"description":"Successful response"},"429":{"description":"Rate limited"},"500":{"description":"Internal error"}},"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"},"500":{"description":"Internal error"}},"security":[],"summary":"Get weekly model usage","tags":["Models"]}},"/v1/realtime/calls":{"post":{"description":"Exchanges a WebRTC SDP offer for an OpenAI Realtime SDP answer. Set the model in `session.model` of the multipart `session` field, or in the `model` query parameter.\n","operationId":"createRealtimeCall","parameters":[{"description":"Model ID used when the multipart `session` field omits `model`.","in":"query","name":"model","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/RealtimeCallRequest"}}},"required":true},"responses":{"200":{"content":{"application/sdp":{"schema":{"type":"string"}}},"description":"The SDP answer."},"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"},"501":{"description":"WebRTC realtime requires BYOK. Platform-key sessions not yet supported."},"502":{"$ref":"#/components/responses/BadGateway"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"ApiKeyAuth":[]}],"summary":"Exchange Realtime WebRTC SDP","tags":["Realtime"]}},"/v1/realtime/client_secrets":{"post":{"description":"Creates an ephemeral client secret for an OpenAI Realtime session. 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"},"501":{"description":"WebRTC realtime requires BYOK. Platform-key sessions not yet supported."},"502":{"$ref":"#/components/responses/BadGateway"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"security":[{"ApiKeyAuth":[]}],"summary":"Create Realtime client secret","tags":["Realtime"]}},"/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.\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"},"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.\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"}},{"in":"query","name":"limit","schema":{"default":100,"maximum":1000,"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/Forbidden"},"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.\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":"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/Forbidden"},"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.\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/Forbidden"},"406":{"$ref":"#/components/responses/NotAcceptable"},"429":{"$ref":"#/components/responses/RateLimited"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get usage top ranking","tags":["Usage"]}}},"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":"OpenAI Realtime sessions over WebRTC","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"}],"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."}]}